mirror of
https://github.com/prometheus/prometheus
synced 2025-01-06 06:31:40 +00:00
Fix path prefix handling for "/"
Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
143917cfe0
commit
dee41028f7
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user