mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-01 10:18:54 -04:00
Fixed versioning not working with anchors
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user