Skip to content

Commit

Permalink
feat(firestore): default serverTimestamps to estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Dec 19, 2022
1 parent 5ecbae0 commit ae85a41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/firestore/bind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ interface _FirestoreRefOptionsWithDefaults extends FirestoreRefOptions {
* See https://vuefire.vuejs.org/guide/global-options.html
*/
converter: FirestoreDataConverter<unknown>

/**
* @defaultValue `{ serverTimestamps: 'estimate' }` to avoid `null` values
*/
snapshotOptions: SnapshotOptions
}

/**
Expand All @@ -85,6 +90,7 @@ const DEFAULT_OPTIONS: _FirestoreRefOptionsWithDefaults = {
wait: true,
maxRefDepth: 2,
converter: firestoreDefaultConverter,
snapshotOptions: { serverTimestamps: 'estimate' },
}
export { DEFAULT_OPTIONS as firestoreOptionsDefaults }

Expand Down

0 comments on commit ae85a41

Please sign in to comment.