Skip to content

Commit

Permalink
fix: set root when globalThis is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Singh1 committed Mar 23, 2024
1 parent 3df86ea commit 9fd6a13
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions patches/lodash-es@4.17.21.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/_root.js b/_root.js
index 281f81280ec9ea137b644ba60b9f5c6ccede4f88..ceb914c0fa8db7d7064d2a6b79f065ec59c826e9 100644
index 281f81280ec9ea137b644ba60b9f5c6ccede4f88..4f97e318c0fb9b3f43962f9351f0c3d06dec29c8 100644
--- a/_root.js
+++ b/_root.js
@@ -3,7 +3,22 @@ import freeGlobal from './_freeGlobal.js';
Expand All @@ -10,7 +10,7 @@ index 281f81280ec9ea137b644ba60b9f5c6ccede4f88..ceb914c0fa8db7d7064d2a6b79f065ec
+var root = freeGlobal || freeSelf || null;
+if (root == null) {
+ (function() {
+ if (typeof globalThis === 'object') return;
+ if (typeof globalThis === 'object') return root = globalThis;
+ Object.defineProperty(Object.prototype, '__magic__', {
+ get: function() {
+ return this;
Expand Down
32 changes: 16 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9fd6a13

Please sign in to comment.