Skip to content
Prev Previous commit
Next Next commit
use checkStartWithValue for consistency
  • Loading branch information
davepwsmith committed Feb 11, 2020
commit a058ceff0f6c77a613d95d9742a7521bd9cceb5d
6 changes: 3 additions & 3 deletions reactfire/firestore/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function useFirestoreDoc<T = unknown>(
return useObservable(
doc(ref),
'firestore doc: ' + ref.path,
options ? options.startWithValue : undefined
checkStartWithValue(options)
);
}

Expand All @@ -63,7 +63,7 @@ export function useFirestoreDocOnce<T = unknown>(
return useObservable(
doc(ref).pipe(first()),
`useFirestoreDocOnce:${ref.path}:${JSON.stringify(options)}`,
options ? options.startWithValue : undefined
checkStartWithValue(options)
);
}

Expand Down Expand Up @@ -116,7 +116,7 @@ export function useFirestoreCollection<T = { [key: string]: unknown }>(
return useObservable(
fromCollectionRef(query, checkIdField(options)),
queryId,
options ? options.startWithValue : undefined
checkStartWithValue(options)
);
}

Expand Down