Skip to content

Commit

Permalink
fixed issue caolan#557 from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
amv committed Jun 17, 2014
1 parent 2321212 commit 2027f8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
return callback();
}
var completed = 0;
var arr_length = arr.length;
_each(arr, function (x) {
iterator(x, only_once(done) );
});
Expand All @@ -131,7 +132,7 @@
}
else {
completed += 1;
if (completed >= arr.length) {
if (completed >= arr_length) {
callback();
}
}
Expand Down

0 comments on commit 2027f8b

Please sign in to comment.