Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 145cbb2

Browse files
committed
correct check for window variable
1 parent b4732db commit 145cbb2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": ["../../.eslintrc.package.json"]
2+
"extends": ["../../.eslintrc.package.json"],
3+
"env": {
4+
"browser": "readonly"
5+
}
36
}

packages/fetch-and-compile/lib/fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async function tryFetchAndCompileAddress(
136136
});
137137

138138
// @ts-ignore
139-
if (window) {
139+
if (typeof window === "undefined") {
140140
externalConfig.compilers.cache = "noCache";
141141
}
142142

0 commit comments

Comments
 (0)