mirror of https://github.com/status-im/web3.js.git
Throwing an error in case of a synchronous call of get() and filterId is not set.
This commit is contained in:
parent
383efa7c0d
commit
a2ae2d7d95
|
@ -211,6 +211,9 @@ Filter.prototype.get = function (callback) {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
if (this.filterId === null) {
|
||||
throw new Error('Filter ID Error: filter().get() can\'t be chained synchronous, please provide a callback for the get() method.');
|
||||
}
|
||||
var logs = this.implementation.getLogs(this.filterId);
|
||||
return logs.map(function (log) {
|
||||
return self.formatter ? self.formatter(log) : log;
|
||||
|
|
Loading…
Reference in New Issue