diff options
author | Ray Myers <raydog87@gmail.com> | 2016-06-22 18:24:00 -0700 |
---|---|---|
committer | Hubert Argasinski <argasinski.hubert@gmail.com> | 2016-06-29 18:38:51 -0400 |
commit | f2cd951d15326de4a585b264d57189658109f757 (patch) | |
tree | 5767f8fcff3ebce7a13c6df1cd4ab7cbf86ceec1 /lib/asyncify.js | |
parent | ed6efaa6429e7d9977d3962f175b56a8cdc30ab3 (diff) | |
download | async-f2cd951d15326de4a585b264d57189658109f757.tar.gz |
Fixed callback being able to be called twice in asyncify
Diffstat (limited to 'lib/asyncify.js')
-rw-r--r-- | lib/asyncify.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asyncify.js b/lib/asyncify.js index e235311..dec39d2 100644 --- a/lib/asyncify.js +++ b/lib/asyncify.js @@ -68,7 +68,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 { |