From dee41028f782ba1a6eee14784e81bcc417f9af30 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Thu, 14 Mar 2024 12:04:50 +0100 Subject: [PATCH] Fix path prefix handling for "/" Signed-off-by: Julius Volz --- web/ui/mantine-ui/src/App.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/ui/mantine-ui/src/App.tsx b/web/ui/mantine-ui/src/App.tsx index 2eb75dc24c..4094ab9f36 100644 --- a/web/ui/mantine-ui/src/App.tsx +++ b/web/ui/mantine-ui/src/App.tsx @@ -162,10 +162,7 @@ const getPathPrefix = (path: string) => { } const pagePath = allPages.find((p) => path.endsWith(p.path))?.path; - if (pagePath === undefined) { - throw new Error(`Could not find base path for ${path}`); - } - return path.slice(0, path.length - pagePath.length); + return path.slice(0, path.length - (pagePath || "").length); }; const navLinkXPadding = "md";