Fix 'Saved View' showing up in breadcrumb when it shouldn't

This commit is contained in:
2024-06-04 10:53:03 -05:00
parent d03e908a9d
commit 2afa82c770

View File

@ -85,7 +85,7 @@ function QBreadcrumbs({icon, title, route, light}: Props): JSX.Element
} }
return (routeToLabel(route)); return (routeToLabel(route));
} };
let pageTitle = branding?.appName ?? ""; let pageTitle = branding?.appName ?? "";
const fullRoutes: string[] = []; const fullRoutes: string[] = [];
@ -94,9 +94,9 @@ function QBreadcrumbs({icon, title, route, light}: Props): JSX.Element
{ {
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
// avoid showing "saved view" as a breadcrumb element // // avoid showing "saved view" as a breadcrumb element //
// e.g., if at /app/table/savedView/1 (so where i==2) // // e.g., if at /app/table/savedView/1 //
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
if(routes[i] === "savedView" && i == 2) if (routes[i] === "savedView" && i == routes.length - 1)
{ {
continue; continue;
} }