mirror of https://github.com/sveltejs/svelte
feat(internal): Support globalThis in modern environments (#4628)
parent
e593bb6d69
commit
255a18f654
@ -1,3 +1,7 @@
|
||||
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