Skip to content
Browse files

Make callback optional

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

0 comments on commit 0501f48

Please sign in to comment.
Something went wrong with that request. Please try again.