mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-24 23:04:32 -04:00
Fixed stay on same page for version selector (9.5.5 regression)
This commit is contained in:
@@ -128,14 +128,13 @@ export function setupVersionSelector(
|
||||
return EMPTY
|
||||
}),
|
||||
switchMap(url => {
|
||||
const { version } = urls.get(url)!
|
||||
return fetchSitemap(new URL(url))
|
||||
.pipe(
|
||||
map(sitemap => {
|
||||
const location = getLocation()
|
||||
const path = location.href.replace(config.base, "")
|
||||
const path = location.href.replace(config.base, url)
|
||||
return sitemap.has(path.split("#")[0])
|
||||
? new URL(`../${version}/${path}`, config.base)
|
||||
? new URL(path)
|
||||
: new URL(url)
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user