Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Jan 22, 2025
1 parent 50ba2e1 commit 5daaf7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/app/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ export function createRouter(
}

async function go(href: string = inBrowser ? location.href : '/') {
if ((await router.onBeforeRouteChange?.(href)) === false) return

href = normalizeHref(href)
const loc = inBrowser ? normalizeHref(location.href) : null

if ((await router.onBeforeRouteChange?.(href)) === false) return

if (loc !== null && href !== loc) {
const { pathname, hash } = new URL(href, fakeHost)
const currentLoc = new URL(loc, fakeHost)
Expand Down

0 comments on commit 5daaf7c

Please sign in to comment.