New upstream version 1.1.6
Pirate Praveen
6 years ago
25 | 25 | , a = l * n |
26 | 26 | if (!a) return cb_(null, []) |
27 | 27 | function cb (er) { |
28 | if (errState) return | |
28 | if (er && !errState) errState = er | |
29 | ||
29 | 30 | var argLen = arguments.length |
30 | 31 | for (var i = 1; i < argLen; i ++) if (arguments[i] !== undefined) { |
31 | 32 | data[i - 1] = (data[i - 1] || []).concat(arguments[i]) |
42 | 43 | }) |
43 | 44 | } |
44 | 45 | |
45 | if (er || --a === 0) { | |
46 | errState = er | |
47 | cb_.apply(null, [errState].concat(data)) | |
48 | } | |
46 | if (--a === 0) cb_.apply(null, [errState].concat(data)) | |
49 | 47 | } |
50 | 48 | // expect the supplied cb function to be called |
51 | 49 | // "n" times for each thing in the array. |