🐛 Fix trailing slash

This commit is contained in:
2025-07-01 19:08:34 +02:00
parent dc4d564059
commit 1d04befff1

View File

@ -8,7 +8,7 @@ let paths: string[]
if (pathname === "/") { if (pathname === "/") {
paths = ["~"] paths = ["~"]
} else { } else {
paths = ["~", ...pathname.split("/").slice(1)] paths = ["~", ...pathname.split("/").filter(x => x)]
} }
function getLink(path: string): NavLink { function getLink(path: string): NavLink {