site: fix scroll to current hash in chrome

This commit is contained in:
afc163 2018-03-03 16:26:40 +08:00
parent d0c58946ee
commit a2018e7c44

View File

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