diff --git a/src/runtime/internal/globals.ts b/src/runtime/internal/globals.ts index 664093d2e4fd..b97f81ab9f47 100644 --- a/src/runtime/internal/globals.ts +++ b/src/runtime/internal/globals.ts @@ -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;