Skip to content

Commit 994b6b0

Browse files
authored
Merge pull request #110 from sunrabbit123/patch-1
fix: 🩹 use unified keywords(PUBLIC_ENV_KEY)
2 parents 8efdf17 + f5afd6d commit 994b6b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/helpers/is-browser.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import { PUBLIC_ENV_KEY } from '../script/constants';
2+
13
/**
24
* Checks if the code is running in the browser.
35
*/
46
export function isBrowser() {
57
// eslint-disable-next-line no-underscore-dangle
6-
return Boolean(typeof window !== 'undefined' && window.__ENV);
8+
return Boolean(typeof window !== 'undefined' && window[PUBLIC_ENV_KEY]);
79
}

0 commit comments

Comments
 (0)