Skip to content

Commit 483bbf0

Browse files
committed
fix scrollToHash
1 parent 70b131e commit 483bbf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function scrollToHash() {
22
if (window.location.hash === '') return;
33

4-
const id = window.location.hash.slice(1);
4+
const id = decodeURI(window.location.hash.slice(1));
55

66
// #id doesn't work with numerical IDs
77
const elem = document.querySelector(`[id="${id}"]`);

0 commit comments

Comments
 (0)