mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed stay on same page for version selector (9.5.5 regression)
This commit is contained in:
parent
937d7ccff1
commit
ceacfe5a2c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -249,7 +249,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.e2f4ecc1.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.5cfa9459.min.js' | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
{{ script | script_tag }}
|
||||
{% endfor %}
|
||||
|
@ -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)
|
||||
})
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user