fix: nav event with spa off, anchor nav refresh page

This commit is contained in:
Jacky Zhao
2023-08-20 18:08:44 -07:00
parent 76185aaeb1
commit a1f26ba52e
2 changed files with 1 additions and 5 deletions

View File

@ -103,7 +103,7 @@ function addGlobalPageResources(
} else {
componentResources.afterDOMLoaded.push(`
window.spaNavigate = (url, _) => window.location.assign(url)
const event = new CustomEvent("nav", { detail: { slug: document.body.dataset.slug } })
const event = new CustomEvent("nav", { detail: { url: document.body.dataset.slug } })
document.dispatchEvent(event)`)
}