diff options
Diffstat (limited to 'node_modules/core-js/modules/_promise-resolve.js')
-rw-r--r-- | node_modules/core-js/modules/_promise-resolve.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/node_modules/core-js/modules/_promise-resolve.js b/node_modules/core-js/modules/_promise-resolve.js index 83f4d682c..c3cac7646 100644 --- a/node_modules/core-js/modules/_promise-resolve.js +++ b/node_modules/core-js/modules/_promise-resolve.js @@ -1,6 +1,10 @@ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); var newPromiseCapability = require('./_new-promise-capability'); module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; var promiseCapability = newPromiseCapability.f(C); var resolve = promiseCapability.resolve; resolve(x); |