Skip to content

Conversation

@bradstiff
Copy link

My app uses multiple modal bottom sheets. I had an intermittent case where with two modals in the queue, I closed the second one, and the first would not reappear.

Upon debugging, I found the second modal had been removed as expected, but when the below code ran, the sheetIndex was -1. This caused the code to remove the first modal as well.

I don't remember specifically what caused the sheetIndex to be -1. Again, this was very intermittent.

In any case, preventing the splice from occurring when the sheetIndex = -1 is consistent with similar logic elsewhere in the code file.

@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@bradstiff
Copy link
Author

Not stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant