feat(internal): Support globalThis in modern environments

fix #3561
pull/4628/head
Фролов Игорь 6 years ago
parent aa3dcc06d6
commit fce1136b14

@ -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 globalThis !== 'undefined'
? globalThis
: typeof window !== 'undefined'
? window
: global) as unknown as typeof globalThis;

Loading…
Cancel
Save