Permalink
Browse files

Don't add undefined to results

  • Loading branch information...
1 parent 7d5c0ce commit 68968120feed77e48527dbc74cf0856a55e52a86 @isaacs isaacs committed Jul 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/chain.js
View
@@ -13,8 +13,8 @@ function chain (things, res, cb) {
? res[res.length - 1] : i }))
if (!things[i]) return LOOP(i + 1, len)
things[i](function (er, data) {
- res.push(er || data)
if (er) return cb(er, res)
+ if (data !== undefined) res.push(er || data)
LOOP(i + 1, len)
})
})(0, things.length) }

0 comments on commit 6896812

Please sign in to comment.