Skip to content

Commit

Permalink
fix global object retrieval on Duktape
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoluc committed Nov 18, 2023
1 parent 7775b21 commit ddba98d
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 ddba98d

Please sign in to comment.