fix: add missing typeof check
This commit is contained in:
parent
7affb28081
commit
420a28c224
|
@ -32,9 +32,9 @@ declare global {
|
||||||
|
|
||||||
declare var browser: any;
|
declare var browser: any;
|
||||||
|
|
||||||
const IS_EXTENSION_BG = window.location.pathname.includes(
|
const IS_EXTENSION_BG =
|
||||||
"_generated_background_page.html",
|
typeof window !== "undefined" &&
|
||||||
);
|
window.location.pathname.includes("_generated_background_page.html");
|
||||||
const IS_EXTENSION_ENV =
|
const IS_EXTENSION_ENV =
|
||||||
typeof window !== "undefined" && window.browser?.runtime?.id;
|
typeof window !== "undefined" && window.browser?.runtime?.id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue