Skip to content

Commit

Permalink
add a workaround of WebKit ~ iOS 10.3 Safari Promise instantiation …
Browse files Browse the repository at this point in the history
…bug, close #932
  • Loading branch information
zloirock committed May 3, 2021
1 parent 11f5cf6 commit c78f69d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,6 +1,6 @@
## Changelog
##### Unreleased
- Nothing
- Added a workaround of WebKit ~ iOS 10.3 Safari `Promise` instantiation bug, [#932](https://github.com/zloirock/core-js/issues/932)

##### 3.11.1 - 2021.04.28
- Made `instanceof Promise` and `.constructor === Promise` work with polyfilled `Promise` for all native promise-based APIs
Expand Down
2 changes: 2 additions & 0 deletions packages/core-js/internals/microtask.js
Expand Up @@ -47,6 +47,8 @@ if (!queueMicrotask) {
} else if (Promise && Promise.resolve) {
// Promise.resolve without an argument throws an error in LG WebOS 2
promise = Promise.resolve(undefined);
// workaround of WebKit ~ iOS Safari 10.1 bug
promise.constructor = Promise;
then = promise.then;
notify = function () {
then.call(promise, flush);
Expand Down

0 comments on commit c78f69d

Please sign in to comment.