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

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

Loading…
Cancel
Save