File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -147,9 +147,7 @@ export const useListVals = <
147147 // that `options` is memoized. If `options` was passed directly then it
148148 // would cause the values to be recalculated every time the whole
149149 // `options object changed
150- const keyField = options ?. keyField || undefined ;
151- const refField = options ?. refField || undefined ;
152- const transform = options ?. transform || undefined ;
150+ const { keyField, refField, transform } = options ?? { } ;
153151
154152 const [ snapshots , loading , error ] = useList ( query ) ;
155153 const values = useMemo (
Original file line number Diff line number Diff line change @@ -41,9 +41,7 @@ export const useObjectVal = <
4141 // that `options` is memoized. If `options` was passed directly then it
4242 // would cause the values to be recalculated every time the whole
4343 // `options object changed
44- const keyField = options ?. keyField || undefined ;
45- const refField = options ?. refField || undefined ;
46- const transform = options ?. transform || undefined ;
44+ const { keyField, refField, transform } = options ?? { } ;
4745
4846 const [ snapshot , loading , error ] = useObject ( query ) ;
4947 const value = useMemo (
You can’t perform that action at this time.
0 commit comments