var async = require('async')
inputs = [1,2]
async.each(inputs,
function (item, callback) {
setTimeout(function(){callback()}, 1000)
},
function(err){
console.log("async.each done")
})
inputs.splice(1,1)
/* output is:
async.each done
async.each done
*/
the problem is async use completed >= arr.length to check if call callback. however arr.length is less than async.each was called.
the problem is async use completed >= arr.length to check if call callback. however arr.length is less than async.each was called.