Fixed versioning not working with anchors

This commit is contained in:
squidfunk
2022-09-07 19:46:26 +02:00
parent 4bd89f9fc3
commit d0f73018f5
4 changed files with 6 additions and 6 deletions

View File

@@ -134,7 +134,7 @@ export function setupVersionSelector(
map(sitemap => {
const location = getLocation()
const path = location.href.replace(config.base, "")
return sitemap.includes(path)
return sitemap.includes(path.split("#")[0])
? new URL(`../${version}/${path}`, config.base)
: new URL(url)
})