|
|
@ -418,8 +418,10 @@ |
|
|
|
}; |
|
|
|
|
|
|
|
Filter.prototype.trigger = function(messages) { |
|
|
|
for(var i = 0; i < this.callbacks.length; i++) { |
|
|
|
this.callbacks[i].call(this, messages); |
|
|
|
if (!(messages instanceof Array) || messages.length) { |
|
|
|
for(var i = 0; i < this.callbacks.length; i++) { |
|
|
|
this.callbacks[i].call(this, messages); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@ -448,7 +450,7 @@ |
|
|
|
if(data._id) { |
|
|
|
var cb = web3._callbacks[data._id]; |
|
|
|
if (cb) { |
|
|
|
cb.call(this, data.error, data.data) |
|
|
|
cb.call(this, data.error, data.data); |
|
|
|
delete web3._callbacks[data._id]; |
|
|
|
} |
|
|
|
} |
|
|
|