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
raydog committed Jun 23, 2016

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 1706048 commit 066c3f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/asyncify.js
Original file line number Diff line number Diff line change
@@ -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 {

0 comments on commit 066c3f1

Please sign in to comment.