diff options
Diffstat (limited to 'node_modules/bluebird/js/release')
-rw-r--r-- | node_modules/bluebird/js/release/debuggability.js | 5 | ||||
-rw-r--r-- | node_modules/bluebird/js/release/promise.js | 2 | ||||
-rw-r--r-- | node_modules/bluebird/js/release/util.js | 5 |
3 files changed, 8 insertions, 4 deletions
diff --git a/node_modules/bluebird/js/release/debuggability.js b/node_modules/bluebird/js/release/debuggability.js index bf0587ce7..695680413 100644 --- a/node_modules/bluebird/js/release/debuggability.js +++ b/node_modules/bluebird/js/release/debuggability.js @@ -38,7 +38,10 @@ Promise.prototype.suppressUnhandledRejections = function() { Promise.prototype._ensurePossibleRejectionHandled = function () { if ((this._bitField & 524288) !== 0) return; this._setRejectionIsUnhandled(); - async.invokeLater(this._notifyUnhandledRejection, this, undefined); + var self = this; + setTimeout(function() { + self._notifyUnhandledRejection(); + }, 1); }; Promise.prototype._notifyUnhandledRejectionIsHandled = function () { diff --git a/node_modules/bluebird/js/release/promise.js b/node_modules/bluebird/js/release/promise.js index 99d20f9eb..f4a641c33 100644 --- a/node_modules/bluebird/js/release/promise.js +++ b/node_modules/bluebird/js/release/promise.js @@ -733,7 +733,7 @@ require("./synchronous_inspection")(Promise); require("./join")( Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); Promise.Promise = Promise; -Promise.version = "3.5.0"; +Promise.version = "3.5.1"; require('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); require('./call_get.js')(Promise); require('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); diff --git a/node_modules/bluebird/js/release/util.js b/node_modules/bluebird/js/release/util.js index 84c28ec47..7ac0e2fa1 100644 --- a/node_modules/bluebird/js/release/util.js +++ b/node_modules/bluebird/js/release/util.js @@ -223,10 +223,11 @@ function safeToString(obj) { } function isError(obj) { - return obj !== null && + return obj instanceof Error || + (obj !== null && typeof obj === "object" && typeof obj.message === "string" && - typeof obj.name === "string"; + typeof obj.name === "string"); } function markAsOriginatingFromRejection(e) { |