fix for optional event parameters

This commit is contained in:
Fabian Vogelsteller 2015-06-24 12:03:32 +02:00
parent 8170a0a211
commit c5ee34d349
7 changed files with 31 additions and 18 deletions

7
dist/web3-light.js vendored
View File

@ -2320,7 +2320,12 @@ SolidityEvent.prototype.execute = function (indexed, options, callback) {
if (utils.isFunction(arguments[arguments.length - 1])) { if (utils.isFunction(arguments[arguments.length - 1])) {
callback = arguments[arguments.length - 1]; callback = arguments[arguments.length - 1];
options = null; if(arguments.length === 2)
options = null;
if(arguments.length === 1) {
options = null;
indexed = {};
}
} }
var o = this.encode(indexed, options); var o = this.encode(indexed, options);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
dist/web3.js vendored
View File

@ -2320,7 +2320,12 @@ SolidityEvent.prototype.execute = function (indexed, options, callback) {
if (utils.isFunction(arguments[arguments.length - 1])) { if (utils.isFunction(arguments[arguments.length - 1])) {
callback = arguments[arguments.length - 1]; callback = arguments[arguments.length - 1];
options = null; if(arguments.length === 2)
options = null;
if(arguments.length === 1) {
options = null;
indexed = {};
}
} }
var o = this.encode(indexed, options); var o = this.encode(indexed, options);

4
dist/web3.js.map vendored

File diff suppressed because one or more lines are too long

11
dist/web3.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -175,7 +175,12 @@ SolidityEvent.prototype.execute = function (indexed, options, callback) {
if (utils.isFunction(arguments[arguments.length - 1])) { if (utils.isFunction(arguments[arguments.length - 1])) {
callback = arguments[arguments.length - 1]; callback = arguments[arguments.length - 1];
options = null; if(arguments.length === 2)
options = null;
if(arguments.length === 1) {
options = null;
indexed = {};
}
} }
var o = this.encode(indexed, options); var o = this.encode(indexed, options);