Added globalThis
This commit is contained in:
parent
4504196d5c
commit
8937494bdd
10
src/index.js
10
src/index.js
@ -92,10 +92,12 @@ export {
|
||||
convertUpdateFormatV2ToV1
|
||||
} from './internals.js'
|
||||
|
||||
const glo = /** @type {any} */ (typeof window !== 'undefined'
|
||||
? window
|
||||
// @ts-ignore
|
||||
: typeof global !== 'undefined' ? global : {})
|
||||
const glo = /** @type {any} */ (typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
// @ts-ignore
|
||||
: typeof global !== 'undefined' ? global : {})
|
||||
|
||||
const importIdentifier = '__ $YJS$ __'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user