diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/promise/src/core.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
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); |