We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20b7e6d commit c4eb143Copy full SHA for c4eb143
src/database/index.ts
@@ -13,6 +13,7 @@ import {
13
} from 'vue-demi'
14
import { DatabaseReference, getDatabase, Query } from 'firebase/database'
15
import {
16
+ isSSR,
17
noop,
18
OperationsType,
19
ResetOption,
@@ -56,6 +57,12 @@ export function _useDatabaseRef(
56
57
) {
58
let unbind!: UnbindWithReset
59
const options = Object.assign({}, databaseOptionsDefaults, localOptions)
60
+
61
+ // During SSR, we should only get data once
62
+ if (isSSR()) {
63
+ options.once = true
64
+ }
65
66
const initialSourceValue = unref(reference)
67
68
const data = options.target || ref<unknown | null>()
0 commit comments