diff --git a/quartz/components/scripts/spa.inline.ts b/quartz/components/scripts/spa.inline.ts index 0318ec3..bc13c93 100644 --- a/quartz/components/scripts/spa.inline.ts +++ b/quartz/components/scripts/spa.inline.ts @@ -15,7 +15,7 @@ const isLocalUrl = (href: string) => { if (window.location.origin === url.origin) { return true } - } catch (e) {} + } catch (e) { } return false } @@ -109,6 +109,7 @@ function createRouter() { if (isSamePage(url) && url.hash) { const el = document.getElementById(decodeURIComponent(url.hash.substring(1))) el?.scrollIntoView() + history.pushState({}, "", url) return }