mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -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;
|
const pagePath = allPages.find((p) => path.endsWith(p.path))?.path;
|
||||||
if (pagePath === undefined) {
|
return path.slice(0, path.length - (pagePath || "").length);
|
||||||
throw new Error(`Could not find base path for ${path}`);
|
|
||||||
}
|
|
||||||
return path.slice(0, path.length - pagePath.length);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const navLinkXPadding = "md";
|
const navLinkXPadding = "md";
|
||||||
|
|
Loading…
Reference in a new issue