Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async.waterfall within Node-Webkit app #344

Closed
3goats opened this issue Jun 30, 2013 · 2 comments
Closed

async.waterfall within Node-Webkit app #344

3goats opened this issue Jun 30, 2013 · 2 comments

Comments

@3goats
Copy link

3goats commented Jun 30, 2013

This seems to be a problem when run within node-webkit - for some reason it seems to ignore all of my steps and jump straight to the results which then throws 'undefined'.

async.waterfall([
    function(callback){
        callback(null, 'one', 'two');
    },
    function(arg1, arg2, callback){
        callback(null, 'three');
    },
    function(arg1, callback){
        // arg1 now equals 'three'
        callback(null, 'done');
    }
], function (err, result) {
    console.log(result)
    // result now equals 'done'
});

However this works OK:

async.series([
function(callback){
    // do some stuff ...
    callback(null, 'one');
},
function(callback){
    // do some more stuff ...
    callback(null, 'two');
}
],
// optional callback
function(err, results){
// results is now equal to ['one', 'two']
});
@Mithgol
Copy link
Contributor

Mithgol commented Jul 2, 2013

You may try my nwglobal module as a workaround until the #303 fix (or any other fix) lands.

(Here “you” means not only @carlskii personally, but rather all of the affected users.)

@Mithgol
Copy link
Contributor

Mithgol commented Mar 29, 2014

For future references, this issue is fixed in 9f57a35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants