Skip to content

Commit

Permalink
Typo. --a should be --l
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 13, 2010
1 parent ac1872f commit 4ed0d79
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions articles/flow-control-in-npm/async-map.js
Expand Up @@ -9,9 +9,7 @@ function asyncMap (list, fn, cb_) {
if (errState) return
if (arguments.length > 1) data = data.concat(d)
if (er) return cb_(errState = er, data)
else if (-- a === 0) cb_(errState, data)
else if (-- l === 0) cb_(errState, data)
}
// expect the supplied cb function to be called
// "n" times for each thing in the array.
list.forEach(function (ar) { fn(ar, cb) })
}

0 comments on commit 4ed0d79

Please sign in to comment.