refactor(client): specify global scope

This commit is contained in:
syuilo
2022-01-16 10:14:14 +09:00
parent b312846ff6
commit 8322c90834
30 changed files with 75 additions and 75 deletions

View File

@@ -115,11 +115,11 @@ export const router = createRouter({
window._scroll = () => { // さらにHacky
if (to.name === 'index') {
window.scroll({ top: indexScrollPos, behavior: 'instant' });
const i = setInterval(() => {
const i = window.setInterval(() => {
window.scroll({ top: indexScrollPos, behavior: 'instant' });
}, 10);
setTimeout(() => {
clearInterval(i);
window.setTimeout(() => {
window.clearInterval(i);
}, 500);
} else {
window.scroll({ top: 0, behavior: 'instant' });