diff options
author | Caolan McMahon <caolan@caolanmcmahon.com> | 2014-03-28 14:42:29 +0000 |
---|---|---|
committer | Caolan McMahon <caolan@caolanmcmahon.com> | 2014-03-28 14:42:29 +0000 |
commit | f5c518eb65a3b97eebef1461b168db17372c1b87 (patch) | |
tree | 7c98a9641994f60e81a531b369e433860d2a64dc /lib | |
parent | 191a5076bf4a9cb6ac87b1bf6e9d4eb0a13527d7 (diff) | |
parent | a03608a10796efa1fdb3bd9ffae6f0ea25320bef (diff) | |
download | async-f5c518eb65a3b97eebef1461b168db17372c1b87.tar.gz |
Merge remote-tracking branch 'th3james/auto-double-callback-issue'
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/async.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/async.js b/lib/async.js index 16240f8..9c04f1f 100755 --- a/lib/async.js +++ b/lib/async.js @@ -422,8 +422,11 @@ addListener(function () { if (_keys(results).length === keys.length) { - callback(null, results); + var theCallback = callback; + // prevent final callback from calling itself if it errors callback = function () {}; + + theCallback(null, results); } }); |