[Pkg-javascript-commits] [node-async] 129/480: #queue(): allow unspecified callbacks

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:19 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit 7a0eaaff4bc86a35f755fa2cfc12b08d1e278ffc
Author: Pierre Curto <pierre.curto at gmail.com>
Date:   Mon Jan 30 18:04:24 2012 +0100

    #queue(): allow unspecified callbacks
---
 lib/async.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/async.js b/lib/async.js
index c862008..286c563 100644
--- a/lib/async.js
+++ b/lib/async.js
@@ -594,7 +594,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);
             },

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list