Comparing version 0.0.3 to 0.0.5
@@ -130,9 +130,16 @@ /** | ||
var actionPromise = self.handleAction(nextAction); | ||
actionPromise.nodeify(function (err, result) { | ||
actionPromise.then(function (result) { | ||
debug('finished ' + nextAction.name); | ||
self.currentAction = null; | ||
if (nextAction.callback) { | ||
nextAction.callback(err, result); | ||
nextAction.callback(null, result); | ||
} | ||
setImmediate(self.next.bind(self)); | ||
}).catch(function (err) { | ||
debug('finished with error ' + nextAction.name); | ||
self.currentAction = null; | ||
if (nextAction.callback) { | ||
nextAction.callback(err); | ||
} | ||
setImmediate(self.next.bind(self)); | ||
}); | ||
@@ -212,3 +219,9 @@ } | ||
Promise.all(waitHandlers).nodeify(callback); | ||
Promise.all(waitHandlers).then(function (result) { | ||
setImmediate(function () { | ||
callback(null, result); | ||
}); | ||
}).catch(function (err) { | ||
callback(err); | ||
}); | ||
}; | ||
@@ -215,0 +228,0 @@ |
{ | ||
"name": "dispatchr", | ||
"version": "0.0.3", | ||
"version": "0.0.5", | ||
"description": "A dispatcher to aid in following the Flux application architecture for applications that run in the server and the client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39449
18
244