We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2725596 commit f70d5eaCopy full SHA for f70d5ea
src/shared.ts
@@ -277,14 +277,11 @@ const ssrContextKey = Symbol.for('v-scx')
277
*/
278
export function useIsSSR(): boolean {
279
const instance = getCurrentInstance()
280
- if (isVue2) {
281
- return (
282
- !!instance &&
+ return !!(isVue2
+ ? instance &&
283
// @ts-expect-error: Vue 2 only API
284
- instance.proxy.$isServer
285
- )
286
- }
287
- return !!inject(ssrContextKey, 0)
+ (instance.proxy.$isServer as boolean)
+ : inject(ssrContextKey, 0))
288
}
289
290
/**
0 commit comments