Skip to content

Commit

Permalink
Merge pull request #1304 from bjoluc/fix-global-object-detection-duktape
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 18, 2023
2 parents 30f9e98 + ddba98d commit 1e88122
Show file tree
Hide file tree
Showing 2 changed files with 3 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
- Fixed an issue getting the global object on Duktape, [#1303](https://github.com/zloirock/core-js/issues/1303)
- Compat data improvements:
- Added [Deno 1.38](https://deno.com/blog/v1.38) compat data mapping
- [`Array.fromAsync`](https://github.com/tc39/proposal-array-from-async) marked as [supported from Deno 1.38](https://github.com/denoland/deno/pull/21048)
Expand Down
3 changes: 2 additions & 1 deletion packages/core-js/internals/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ module.exports =
// eslint-disable-next-line no-restricted-globals -- safe
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
check(typeof this == 'object' && this) ||
// eslint-disable-next-line no-new-func -- fallback
(function () { return this; })() || this || Function('return this')();
(function () { return this; })() || Function('return this')();

0 comments on commit 1e88122

Please sign in to comment.