diff --git a/src/index.ts b/src/index.ts index b4a9b17..5c162a0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,7 @@ export * from './base' // ref: https://github.com/tc39/proposal-global const getGlobal = function () { + if (typeof globalThis !== 'undefined') { return globalThis } if (typeof self !== 'undefined') { return self } if (typeof window !== 'undefined') { return window } if (typeof global !== 'undefined') { return global }