diff options
Diffstat (limited to 'node_modules/bluebird/js/browser/bluebird.core.js')
-rw-r--r-- | node_modules/bluebird/js/browser/bluebird.core.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/node_modules/bluebird/js/browser/bluebird.core.js b/node_modules/bluebird/js/browser/bluebird.core.js index c94f3c228..85b779137 100644 --- a/node_modules/bluebird/js/browser/bluebird.core.js +++ b/node_modules/bluebird/js/browser/bluebird.core.js @@ -23,7 +23,7 @@ * */ /** - * bluebird build version 3.5.0 + * bluebird build version 3.5.1 * Features enabled: core * Features disabled: race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each */ @@ -559,7 +559,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 () { @@ -2848,7 +2851,7 @@ _dereq_("./synchronous_inspection")(Promise); _dereq_("./join")( Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain); Promise.Promise = Promise; -Promise.version = "3.5.0"; +Promise.version = "3.5.1"; util.toFastProperties(Promise); util.toFastProperties(Promise.prototype); @@ -3618,10 +3621,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) { |