Skip to content

Commit

Permalink
add a workaround for getting proper global object in Figma plugins, c…
Browse files Browse the repository at this point in the history
…lose #1231
  • Loading branch information
zloirock committed Apr 24, 2023
1 parent 413ebc2 commit 3c5394d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Changelog
##### Unreleased
- Added a fix for a NodeJS 20.0.0 [bug](https://github.com/nodejs/node/issues/47612) with cloning `File` via `structuredClone`
- Added a workaround for getting proper global object in Figma plugins, [#1231](https://github.com/zloirock/core-js/issues/1231)
- Compat data improvements:
- Added NodeJS 20.0 compat data mapping

Expand Down
2 changes: 1 addition & 1 deletion packages/core-js/internals/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ module.exports =
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func -- fallback
(function () { return this; })() || Function('return this')();
(function () { return this; })() || this || Function('return this')();

0 comments on commit 3c5394d

Please sign in to comment.