Skip to content

Commit

Permalink
remove unhandled rejection tracking check in non-browser non-node pla…
Browse files Browse the repository at this point in the history
…tforms
  • Loading branch information
zloirock committed May 3, 2021
1 parent afc66bc commit e5b874c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
##### Unreleased
- Added a workaround of WebKit ~ iOS 10.3 Safari `Promise` instantiation bug, [#932](https://github.com/zloirock/core-js/issues/932)
- `Promise#then` of incorrect native `Promise` implementations with correct subclassing no longer wrapped
- Changed the order of `Promise` feature detection, removed unhandled rejection tracking check in non-browser non-node platforms

##### 3.11.1 - 2021.04.28
- Made `instanceof Promise` and `.constructor === Promise` work with polyfilled `Promise` for all native promise-based APIs
Expand Down
1 change: 1 addition & 0 deletions packages/core-js/internals/engine-is-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = typeof window == 'object';
3 changes: 2 additions & 1 deletion packages/core-js/modules/es.promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var perform = require('../internals/perform');
var InternalStateModule = require('../internals/internal-state');
var isForced = require('../internals/is-forced');
var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_BROWSER = require('../internals/engine-is-browser');
var IS_NODE = require('../internals/engine-is-node');
var V8_VERSION = require('../internals/engine-v8-version');

Expand Down Expand Up @@ -74,7 +75,7 @@ var FORCED = isForced(PROMISE, function () {
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
if (!SUBCLASSING) return true;
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
return !GLOBAL_CORE_JS_PROMISE && !IS_NODE && !NATIVE_REJECTION_EVENT;
return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
});

var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
Expand Down

0 comments on commit e5b874c

Please sign in to comment.