diff --git a/src/runtime/internal/globals.ts b/src/runtime/internal/globals.ts index 831555163f..b97f81ab9f 100644 --- a/src/runtime/internal/globals.ts +++ b/src/runtime/internal/globals.ts @@ -1,7 +1,7 @@ declare const global: any; -export const globals = (typeof globalThis !== 'undefined' - ? globalThis - : typeof window !== 'undefined' +export const globals = (typeof window !== 'undefined' ? window + : typeof globalThis !== 'undefined' + ? globalThis : global) as unknown as typeof globalThis;