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