Skip to content

Commit

Permalink
fix: globalThis, close #1187, close #1163, close #1175
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 25, 2022
1 parent b61ceec commit 3c8cdde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/ssr-handlers.ts
Expand Up @@ -21,7 +21,7 @@ export interface SSRHandlersMap {
updateHTMLAttrs: (selector: string, attribute: string, value: string) => void
}

const _global = globalThis || this
const _global = typeof globalThis === 'undefined' ? this : globalThis
const globalKey = '__vueuse_ssr_handlers__'
// @ts-expect-error inject global
_global[globalKey] = _global[globalKey] || {}
Expand Down

0 comments on commit 3c8cdde

Please sign in to comment.