Skip to content

Commit

Permalink
fix rhp is dismissed when workspace initial page is in the nav stack …
Browse files Browse the repository at this point in the history
…on small screen
  • Loading branch information
bernhardoj committed Dec 10, 2024
1 parent 709940e commit 9226324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspaceInitialPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9226324

Please sign in to comment.