diff options
Diffstat (limited to 'node_modules/promise/src/core.js')
-rw-r--r-- | node_modules/promise/src/core.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/promise/src/core.js b/node_modules/promise/src/core.js index 7513f27d9..312010d92 100644 --- a/node_modules/promise/src/core.js +++ b/node_modules/promise/src/core.js @@ -56,7 +56,7 @@ function Promise(fn) { throw new TypeError('Promises must be constructed via new'); } if (typeof fn !== 'function') { - throw new TypeError('not a function'); + throw new TypeError('Promise constructor\'s argument is not a function'); } this._deferredState = 0; this._state = 0; @@ -84,7 +84,7 @@ function safeThen(self, onFulfilled, onRejected) { res.then(resolve, reject); handle(self, new Handler(onFulfilled, onRejected, res)); }); -}; +} function handle(self, deferred) { while (self._state === 3) { self = self._value; @@ -205,7 +205,7 @@ function doResolve(fn, promise) { if (done) return; done = true; reject(promise, reason); - }) + }); if (!done && res === IS_ERROR) { done = true; reject(promise, LAST_ERROR); |