mirror of
https://github.com/zhigang1992/react-native-bottom-sheet.git
synced 2026-01-12 17:42:17 +08:00
fix: prevent crash when set index -1 with animateOnMount
This commit is contained in:
@@ -498,7 +498,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
|
||||
animateOnMount &&
|
||||
isLayoutCalculated &&
|
||||
didMountOnAnimate.current === false &&
|
||||
isClosing.current === false
|
||||
isClosing.current === false &&
|
||||
_providedIndex !== -1
|
||||
) {
|
||||
manualSnapToPoint.setValue(snapPoints[_providedIndex]);
|
||||
didMountOnAnimate.current = true;
|
||||
|
||||
Reference in New Issue
Block a user