pull/3449/head
Tuğçe Küçükoğlu 2022-12-27 16:04:03 +03:00
parent 076e37847c
commit 340f2652f8
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
export default defineNuxtRouteMiddleware((to, from) => { export default defineNuxtRouteMiddleware((to, from) => {
useNuxtApp().hook('page:finish', () => { useNuxtApp().hook('page:finish', () => {
if (to.path !== from.path && history.state) { if (to.path !== from.path && history.state.scroll) {
window.scrollTo(history.state.scroll); window.scrollTo(history.state.scroll);
} else { } else {
window.scrollTo(0, 0); window.scrollTo(0, 0);