Skip to content

Commit d8a7bc1

Browse files
committed
chore: rename internal isSSR
1 parent bb75fa7 commit d8a7bc1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/database/useDatabaseRef.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
_Nullable,
1919
UnbindWithReset,
2020
checkWrittenTarget,
21-
isSSR,
21+
useIsSSR,
2222
noop,
2323
ResetOption,
2424
} from '../shared'
@@ -59,7 +59,8 @@ export function _useDatabaseRef(
5959
}
6060

6161
// During SSR, we should only get data once
62-
if (isSSR()) {
62+
const isSSR = useIsSSR()
63+
if (isSSR) {
6364
options.once = true
6465
}
6566

src/firestore/useFirestoreRef.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
UnbindWithReset,
2626
noop,
2727
checkWrittenTarget,
28-
isSSR,
28+
useIsSSR,
2929
isDocumentRef,
3030
ResetOption,
3131
OperationsType,
@@ -79,7 +79,7 @@ export function _useFirestoreRef(
7979
}
8080
}
8181

82-
if (isSSR()) {
82+
if (useIsSSR()) {
8383
options.once = true
8484
}
8585

src/shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export interface _ResolveRejectFn {
272272
*
273273
* @internal
274274
*/
275-
export function isSSR(): boolean {
275+
export function useIsSSR(): boolean {
276276
return !!(getCurrentInstance() && inject(ssrContextKey, null))
277277
}
278278

0 commit comments

Comments
 (0)