Added globalThis

This commit is contained in:
Patrick Shaw 2022-06-01 13:36:32 +10:00
parent 4504196d5c
commit 8937494bdd

View File

@ -92,10 +92,12 @@ export {
convertUpdateFormatV2ToV1 convertUpdateFormatV2ToV1
} from './internals.js' } from './internals.js'
const glo = /** @type {any} */ (typeof window !== 'undefined' const glo = /** @type {any} */ (typeof globalThis !== 'undefined'
? window ? globalThis
// @ts-ignore : typeof window !== 'undefined'
: typeof global !== 'undefined' ? global : {}) ? window
// @ts-ignore
: typeof global !== 'undefined' ? global : {})
const importIdentifier = '__ $YJS$ __' const importIdentifier = '__ $YJS$ __'