Skip to content

Commit 9226324

Browse files
committed
fix rhp is dismissed when workspace initial page is in the nav stack on small screen
1 parent 709940e commit 9226324

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/workspace/WorkspaceInitialPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
359359

360360
// We are checking if the user can access the route.
361361
// If user can't access the route, we are dismissing any modals that are open when the NotFound view is shown
362-
const canAccessRoute = activeRoute && menuItems.some((item) => item.routeName === activeRoute);
362+
const canAccessRoute = activeRoute && (menuItems.some((item) => item.routeName === activeRoute) || activeRoute === SCREENS.WORKSPACE.INITIAL);
363363

364364
useEffect(() => {
365365
if (!shouldShowNotFoundPage && canAccessRoute) {

0 commit comments

Comments
 (0)