diff --git a/lib/web3/filter.js b/lib/web3/filter.js index 4a45a33..131dd1b 100644 --- a/lib/web3/filter.js +++ b/lib/web3/filter.js @@ -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;