Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/components/bottomSheetModal/BottomSheetModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,15 @@ function BottomSheetModalComponent<T = never>(
}

/**
* if the modal position is already in a closed position,
* if the modal was never presented or is already in a closed position,
* then we unmount the node and early exit.
*/
if (
[MODAL_STATUS.CLOSED, MODAL_STATUS.MINIMIZED].includes(
statusRef.current
) ||
[
MODAL_STATUS.INITIAL,
MODAL_STATUS.CLOSED,
MODAL_STATUS.MINIMIZED,
].includes(statusRef.current) ||
(statusRef.current === MODAL_STATUS.DISMISSING &&
currentIndexRef.current === -1)
) {
Expand Down
Loading