Skip to content

Commit 5dfab58

Browse files
committed
chore: update code
1 parent 197f295 commit 5dfab58

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/runtime/getGlobalThis.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ module.exports = (function () {
1212
globalObj = this || new Function("return this")();
1313
} catch {
1414
// This works if the window reference is available
15-
if (typeof globalThis.window === "object") {
16-
return globalThis;
15+
// eslint-disable-next-line unicorn/prefer-global-this
16+
if (typeof window === "object") {
17+
// eslint-disable-next-line unicorn/prefer-global-this, no-undef
18+
return window;
1719
}
1820

1921
// This works if the self reference is available

0 commit comments

Comments
 (0)