Skip to content

Commit

Permalink
When last argument is falsy, Override by default callback instead of …
Browse files Browse the repository at this point in the history
…appending it
  • Loading branch information
felicienfrancois committed Feb 10, 2016
1 parent 2264600 commit cada7ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ function Executor () {
};

newArguments[newArguments.length - 1] = callback;
} else if (!lastArg && task.arguments.length) {
callback = function () { cb(); };
newArguments[newArguments.length - 1] = callback;
} else {
callback = function () { cb(); };
newArguments.push(callback);
Expand Down

0 comments on commit cada7ff

Please sign in to comment.