File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -142,17 +142,17 @@ export const BottomSheet = React.forwardRef<
142142 maxHeightRef,
143143 maxSnapRef,
144144 minSnapRef,
145- updateSnap,
146145 observeBoundsRef,
146+ updateSnap,
147147 } = useSnapResponder ( {
148148 draggingRef,
149- maxHeight,
150- minSnap,
151- prefersReducedMotion,
152- maxSnap,
153149 findSnap,
154150 heightRef,
155151 lastSnapRef,
152+ maxHeight,
153+ maxSnap,
154+ minSnap,
155+ prefersReducedMotion,
156156 set,
157157 } )
158158 useImperativeHandle (
@@ -485,6 +485,13 @@ export const BottomSheet = React.forwardRef<
485485 axis : 'y' ,
486486 } )
487487
488+ if ( Number . isNaN ( maxSnapRef . current ) ) {
489+ throw new TypeError ( 'maxSnapRef is NaN!!' )
490+ }
491+ if ( Number . isNaN ( minSnapRef . current ) ) {
492+ throw new TypeError ( 'minSnapRef is NaN!!' )
493+ }
494+
488495 // @TODO the ts-ignore comments are because the `extrapolate` param isn't in the TS defs for some reason
489496 const interpolateBorderRadius =
490497 maxHeightRef . current !== maxSnapRef . current
You can’t perform that action at this time.
0 commit comments