Skip to content

async.during iteratee callback do not support optional parameter #1217

@thatisuday

Description

@thatisuday

I am using v2.0.0 on client side.

In async.during example, if we pass a optional value in callback of iterate, javascript show error of callback is not a function in truthy functon.

var count = 0;

async.during(
    function (callback) {
        console.warn(arguments);
        return callback(null, count < 5);
    },
    function (callback) {
        count++;
        setTimeout(function(){
          callback(null, count);
        }, 1000);
    },
    function (err, res) {
        console.info(res); // 5 seconds have passed
    }
);

Is there anything I am doing wrong? I guess this is also mentioned in documentation that callback will be passed an error and any arguments passed to the final fn's callback

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions