site: fix hash

This commit is contained in:
afc163 2018-10-26 20:31:06 +08:00
parent 54e24421d1
commit 96e0cb5313

View File

@ -72,7 +72,7 @@ export default class MainContent extends React.Component {
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
if (window.location.hash) { if (window.location.hash) {
document.querySelector(window.location.hash).scrollIntoView(); document.querySelector(decodeURIComponent(window.location.hash)).scrollIntoView();
} }
}, 50); }, 50);
} }