Skip to content

Commit

Permalink
Update lib/asyncify.js
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Early <alexander.early@gmail.com>
  • Loading branch information
nwalters512 and aearly committed Oct 30, 2023
1 parent c448a86 commit 9436c1c
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
Expand Up @@ -87,7 +87,7 @@ function handlePromise(promise, callback) {
return promise.then(value => {
invokeCallback(callback, null, value);
}, err => {
invokeCallback(callback, err instanceof Error ? err : new Error(err));
invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err));
});
}

Expand Down

0 comments on commit 9436c1c

Please sign in to comment.