fix opening same modal twice (#7639)

Co-authored-by: Fokin Aleksandr Konstantinovich <aleksafokin@ozon.ru>
This commit is contained in:
Alex Yetto 2023-12-01 12:48:40 +03:00 committed by GitHub
parent 7c747c28b6
commit ab7da5f664
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -564,7 +564,7 @@ export async function dismissAllModalsAndPopToScreen(screenId: AvailableScreens,
}
export function showModal(name: AvailableScreens, title: string, passProps = {}, options: Options = {}) {
if (!isScreenRegistered(name)) {
if (!isScreenRegistered(name) || NavigationStore.getVisibleModal() === name) {
return;
}