When last argument is falsy, Override by default callback instead of appending it

pull/2/head
Félicien FRANCOIS 9 years ago
parent 2264600955
commit cada7ff179
  1. 3
      lib/executor.js

@ -31,6 +31,9 @@ function Executor () {
}; };
newArguments[newArguments.length - 1] = callback; newArguments[newArguments.length - 1] = callback;
} else if (!lastArg && task.arguments.length) {
callback = function () { cb(); };
newArguments[newArguments.length - 1] = callback;
} else { } else {
callback = function () { cb(); }; callback = function () { cb(); };
newArguments.push(callback); newArguments.push(callback);

Loading…
Cancel
Save