fix: add missing typeof check

This commit is contained in:
Derrick Hammer 2023-07-29 16:46:28 -04:00
parent 7affb28081
commit 420a28c224
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -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;