Permalink
Browse files

Last call to next() will pass arguments to callback

  • Loading branch information...
tim-smart committed Jun 19, 2010
1 parent 12dd098 commit 9bf6910fb4e6b851e23ac0455c2c02d5f6acff18
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/parallel/index.js
View
@@ -84,7 +84,7 @@ Sequence.prototype.run = function run(callback) {
var next = function next() {
var task = tasks.shift();
if (typeof task !== 'function') {
- return callback();
+ return callback.apply(this, arguments);
}
var args = Array.prototype.slice.call(arguments);
args.unshift(next);

0 comments on commit 9bf6910

Please sign in to comment.