diff --git a/src/tcgdex.browser.ts b/src/tcgdex.browser.ts index f3475cd..352e68f 100644 --- a/src/tcgdex.browser.ts +++ b/src/tcgdex.browser.ts @@ -3,4 +3,9 @@ import unfetch from 'unfetch' TCGdex.fetch = window.fetch ?? unfetch as any -(global ?? window).TCGdex = TCGdex +if (typeof global !== 'undefined') { + global.TCGdex = TCGdex +} +if (typeof window !== 'undefined') { + (window as any).TCGdex = TCGdex +}