Skip to content

Commit 379821a

Browse files
committed
fix: update querySelector to use decodeURIComponent for link hash
1 parent ea852a6 commit 379821a

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(encodeURIComponent(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)