mirror of https://github.com/sveltejs/svelte
feat(internal): Support globalThis in modern environments (#4628)
parent
89f30dae36
commit
085897c799
@ -1,3 +1,7 @@
|
|||||||
declare const global: any;
|
declare const global: any;
|
||||||
|
|
||||||
export const globals = (typeof window !== 'undefined' ? window : global) as unknown as typeof globalThis;
|
export const globals = (typeof window !== 'undefined'
|
||||||
|
? window
|
||||||
|
: typeof globalThis !== 'undefined'
|
||||||
|
? globalThis
|
||||||
|
: global) as unknown as typeof globalThis;
|
||||||
|
Loading…
Reference in new issue