Merge pull request #2373 from webzwo0i/avoid-global-vairables

dont make local variables global
This commit is contained in:
John McLear 2014-12-16 00:41:41 +00:00
commit cfa3f15f94
11 changed files with 14 additions and 14 deletions

View file

@ -41,7 +41,7 @@ exports.syncMapFirst = function (lst, fn) {
exports.mapFirst = function (lst, fn, cb) {
var i = 0;
next = function () {
var next = function () {
if (i >= lst.length) return cb(undefined);
fn(lst[i++], function (err, result) {
if (err) return cb(err);