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 402288b commit 197b036Copy full SHA for 197b036
src/shared.ts
@@ -9,7 +9,7 @@ import {
9
Timestamp,
10
} from 'firebase/firestore'
11
import { StorageReference } from 'firebase/storage'
12
-import { inject, ssrContextKey } from 'vue-demi'
+import { getCurrentInstance, inject, ssrContextKey } from 'vue-demi'
13
import type { Ref, ShallowRef } from 'vue-demi'
14
15
export const noop = () => {}
@@ -280,5 +280,5 @@ export interface _ResolveRejectFn {
280
* @internal
281
*/
282
export function isSSR(): boolean {
283
- return !!inject(ssrContextKey, null)
+ return !!(getCurrentInstance() && inject(ssrContextKey, null))
284
}
0 commit comments