Skip to content

Commit

Permalink
Merge pull request caolan#86 from pierrec/master
Browse files Browse the repository at this point in the history
Allow unspecified callback in #queue.push(task, callback)
  • Loading branch information
Caolan McMahon committed Feb 13, 2012
2 parents bb07255 + 7a0eaaf commit c89db1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/async.js
Expand Up @@ -595,7 +595,7 @@
empty: null,
drain: null,
push: function (data, callback) {
q.tasks.push({data: data, callback: callback});
q.tasks.push({data: data, callback: typeof callback === 'function' ? callback : null});
if(q.saturated && q.tasks.length == concurrency) q.saturated();
async.nextTick(q.process);
},
Expand Down

0 comments on commit c89db1f

Please sign in to comment.