Fix for "filterCreationErrorCallback is not a function" Error #552 (#861)

This commit is contained in:
Alex Oberhauser 2017-05-09 05:38:31 -04:00 committed by Fabian Vogelsteller
parent 54e40bb4bb
commit f310e7ccdc
2 changed files with 5 additions and 3 deletions

View File

@ -150,7 +150,9 @@ var Filter = function (requestManager, options, methods, formatter, callback, fi
self.callbacks.forEach(function(cb){ self.callbacks.forEach(function(cb){
cb(error); cb(error);
}); });
filterCreationErrorCallback(error); if (typeof filterCreationErrorCallback === 'function') {
filterCreationErrorCallback(error);
}
} else { } else {
self.filterId = id; self.filterId = id;

View File

@ -335,8 +335,8 @@ Eth.prototype.contract = function (abi) {
return factory; return factory;
}; };
Eth.prototype.filter = function (fil, callback) { Eth.prototype.filter = function (fil, callback, filterCreationErrorCallback) {
return new Filter(this._requestManager, fil, watches.eth(), formatters.outputLogFormatter, callback); return new Filter(this._requestManager, fil, watches.eth(), formatters.outputLogFormatter, callback, filterCreationErrorCallback);
}; };
Eth.prototype.namereg = function () { Eth.prototype.namereg = function () {