mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08: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 a new issue