Skip to content

Commit

Permalink
Fixed callback being able to be called twice in asyncify
Browse files Browse the repository at this point in the history
  • Loading branch information
raydog committed Jun 23, 2016
1 parent 1706048 commit 066c3f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/asyncify.js
Expand Up @@ -67,7 +67,7 @@ export default function asyncify(func) {
if (isObject(result) && typeof result.then === 'function') {
result.then(function(value) {
callback(null, value);
})['catch'](function(err) {
}, function(err) {
callback(err.message ? err : new Error(err));
});
} else {
Expand Down

0 comments on commit 066c3f1

Please sign in to comment.