Skip to content

Commit

Permalink
fix: jump to anchor on deployed site triggering spa refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Aug 21, 2023
1 parent 425c978 commit 173ec24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions quartz/components/scripts/spa.inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function createRouter() {
window.addEventListener("click", async (event) => {
const { url } = getOpts(event) ?? {}
if (!url) return
if (url.pathname === window.location.pathname) return
event.preventDefault()
try {
navigate(url, false)
Expand Down

0 comments on commit 173ec24

Please sign in to comment.