We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 665f3b0 commit a3df617Copy full SHA for a3df617
src/client/app/router.ts
@@ -79,14 +79,14 @@ export function createRouter(
79
history.replaceState({ scrollPosition: window.scrollY }, document.title)
80
history.pushState(null, '', href)
81
}
82
- if ((await router.onBeforePageLoad?.(href)) === false) return
83
await loadPage(href)
84
await router.onAfterRouteChanged?.(href)
85
86
87
let latestPendingPath: string | null = null
88
89
async function loadPage(href: string, scrollPosition = 0, isRetry = false) {
+ if ((await router.onBeforePageLoad?.(href)) === false) return
90
const targetLoc = new URL(href, fakeHost)
91
const pendingPath = (latestPendingPath = targetLoc.pathname)
92
try {
0 commit comments