Skip to content

Commit

Permalink
fix: prevented animatedSnapPoints reaction from running randomly
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed May 23, 2021
1 parent 48c4988 commit bf4e461
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/bottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
() => animatedSnapPoints.value,
(_animatedSnapPoints, _previousAnimatedSnapPoints) => {
if (
JSON.stringify(_animatedSnapPoints) ===
JSON.stringify(_previousAnimatedSnapPoints) ||
!isLayoutCalculated.value ||
!isAnimatedOnMount.value ||
animatedAnimationState.value === ANIMATION_STATE.RUNNING
Expand Down

0 comments on commit bf4e461

Please sign in to comment.