Skip to content

Commit 07faea6

Browse files
authored
Merge pull request #1 from 7nohe/fix/link-hash
fix: update querySelector to use decodeURIComponent for link hash
2 parents 1efcd7f + 379821a commit 07faea6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function initBaseComponents(Alpine) {
152152
.slice()
153153
.reverse()
154154
.find((link) => {
155-
const el = document.querySelector(link.hash)
155+
const el = document.querySelector(decodeURIComponent(link.hash))
156156
return el.getBoundingClientRect().top <= 100
157157
}) ?? links[0]
158158

0 commit comments

Comments
 (0)