不要怂,就是干,撸起袖子干!

Commit 916d52f2 by Mick Hansen

Refactor done() to apply args given, so as not to allways call with 2nd param, a…

…s this messes with async.js auto
1 parent d4d2f7be
Showing with 5 additions and 1 deletions
......@@ -49,7 +49,11 @@ module.exports = (function() {
function(fct) {
fct = bindToProcess(fct);
this.on('error', function(err) { fct(err, null) })
.on('success', function(arg0, arg1) { fct(null, arg0, arg1) })
.on('success', function() {
var args = Array.prototype.slice.call(arguments);
args.unshift(null);
fct.apply(fct, args);
})
return this
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!