From 9226324c6b9107688f5a5d49c4534d6eee4ebaf2 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 10 Dec 2024 14:40:14 +0800 Subject: [PATCH] fix rhp is dismissed when workspace initial page is in the nav stack on small screen --- src/pages/workspace/WorkspaceInitialPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index d279cba2ec65..4ddf2235992b 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -359,7 +359,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac // We are checking if the user can access the route. // If user can't access the route, we are dismissing any modals that are open when the NotFound view is shown - const canAccessRoute = activeRoute && menuItems.some((item) => item.routeName === activeRoute); + const canAccessRoute = activeRoute && (menuItems.some((item) => item.routeName === activeRoute) || activeRoute === SCREENS.WORKSPACE.INITIAL); useEffect(() => { if (!shouldShowNotFoundPage && canAccessRoute) {