Skip to content

Commit d6b58a4

Browse files
committed
Fix missing useMemo parameter
1 parent 505b29d commit d6b58a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

database/useList.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const useListVals = <T>(
104104
snapshotToData(snapshot, keyField, refField)
105105
)
106106
: undefined,
107-
[snapshots, options && options.keyField]
107+
[snapshots, keyField, refField]
108108
);
109109

110110
const resArray: ListValsHook<T> = [values, loading, error];

database/useObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const useObjectVal = <T>(
4848
const [snapshot, loading, error] = useObject(query);
4949
const value = useMemo(
5050
() => (snapshot ? snapshotToData(snapshot, keyField, refField) : undefined),
51-
[snapshot, options && options.keyField]
51+
[snapshot, keyField, refField]
5252
);
5353

5454
const resArray: ObjectValHook<T> = [value, loading, error];

0 commit comments

Comments
 (0)