fix initial component mount sometimes displays not found modal

the reason why it happens is known
This commit is contained in:
Vitaly Turovsky 2025-06-18 08:37:13 +03:00
commit 1b20845ed5

View file

@ -32,7 +32,7 @@ export default () => {
const { enabled } = useSnapshot(componentActive)
const lastModal = useSnapshot(activeModalStack).at(-1)?.reactType
if (!enabled) return null
if (!enabled || watchedModalsFromHooks.value.includes(lastModal!)) return null
return <Screen
title={`Error: Modal (route) ${lastModal} is is unavailable or doesn't exist`}
style={{