fix: add type check on window

This commit is contained in:
Derrick Hammer 2023-07-21 09:28:40 -04:00
parent 9a386fed7d
commit ceffa292ca
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ declare global {
}
const IS_EXTENSION =
typeof window !== "undefined" &&
window.browser?.runtime?.id &&
window.location.pathname.includes("_generated_background_page.html");