Skip to content

Commit

Permalink
ignore NodeJS in IS_BROWSER detection to avoid a false positive wit…
Browse files Browse the repository at this point in the history
…h `jsdom`, #1110
  • Loading branch information
zloirock committed Jul 28, 2022
1 parent 43a054a commit a52a60a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Changelog
##### Unreleased
- NodeJS is ignored in `IS_BROWSER` detection to avoid a false positive with `jsdom`, [#1110](https://github.com/zloirock/core-js/issues/1110)
- Fixed detection of `@@species` support in `Promise` in some old engines
- `{ Array, %TypedArray% }.prototype.{ findLast, findLastIndex }` marked as shipped [in FF104](https://bugzilla.mozilla.org/show_bug.cgi?id=1775026)
- Added iOS Safari 15.6 compat data mapping
Expand Down
7 changes: 6 additions & 1 deletion packages/core-js/internals/engine-is-browser.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
module.exports = typeof window == 'object' && typeof Deno != 'object';
var IS_DENO = require('../internals/engine-is-deno');
var IS_NODE = require('../internals/engine-is-node');

module.exports = !IS_DENO && !IS_NODE
&& typeof window == 'object'
&& window.document && document.nodeType === 9;

0 comments on commit a52a60a

Please sign in to comment.