Skip to content

Commit

Permalink
Merge pull request #1 from 7nohe/fix/link-hash
Browse files Browse the repository at this point in the history
fix: update querySelector to use decodeURIComponent for link hash
  • Loading branch information
thetutlage authored Sep 3, 2024
2 parents 1efcd7f + 379821a commit 07faea6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function initBaseComponents(Alpine) {
.slice()
.reverse()
.find((link) => {
const el = document.querySelector(link.hash)
const el = document.querySelector(decodeURIComponent(link.hash))
return el.getBoundingClientRect().top <= 100
}) ?? links[0]

Expand Down

0 comments on commit 07faea6

Please sign in to comment.