From b68c274cbea12b3ce9288d5ce9525ad304bc0736 Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Tue, 17 Dec 2024 00:54:11 +0100 Subject: [PATCH] Fix breadcrumb trimming --- frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte index 5fc7d89a9..5675c0fb2 100644 --- a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte +++ b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte @@ -9,7 +9,7 @@ currentPath: string ): Promise { const idx = breadcrumbs.findIndex((c) => c.href === currentPath); - if (idx < breadcrumbs.length - 1) { + if (idx >= 0 && idx < breadcrumbs.length - 1) { breadcrumbs = breadcrumbs.slice(0, idx + 1); } return breadcrumbs;