-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
I called the iteratee callback of during
with an additional parameter and what happened is that this parameter was passed to the test
function as first parameter.
const async=require("async");
var count = 0;
async.during((callback) => {
console.log(callback);
callback(null, count < 3);
}, (callback) => {
count++;
callback(null, "Some String");
}, (err) => {
console.log("Done");
});
Output:
[Function]
Some String
/app/test.js:6
callback(null, count < 3);
^
TypeError: callback is not a function
at /app/test.js:6:3
at /app/node_modules/async/lib/async.js:825:22
at /app/node_modules/async/lib/async.js:167:37
at /app/test.js:9:3
at check (/app/node_modules/async/lib/async.js:833:17)
at /app/test.js:6:3
at Object.async.during (/app/node_modules/async/lib/async.js:839:9)
at Object.<anonymous> (/app/test.js:4:7)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
Is this intended or a bug?