mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-24 23:04:32 -04:00
Fixed race condition in instant loading
This commit is contained in:
@@ -229,7 +229,6 @@ export function setupInstantLoading(
|
||||
withLatestFrom(document$)
|
||||
)
|
||||
.subscribe(([, { title, head }]) => {
|
||||
document.dispatchEvent(new CustomEvent("DOMContentSwitch"))
|
||||
document.title = title
|
||||
|
||||
/* Replace meta tags */
|
||||
@@ -247,6 +246,9 @@ export function setupInstantLoading(
|
||||
replaceElement(prev, next)
|
||||
}
|
||||
}
|
||||
|
||||
/* Finished, dispatch document switch event */
|
||||
document.dispatchEvent(new CustomEvent("DOMContentSwitch"))
|
||||
})
|
||||
|
||||
/* Debounce update of viewport offset */
|
||||
|
||||
Reference in New Issue
Block a user