We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eca068 commit 3695490Copy full SHA for 3695490
src/router/index.js
@@ -105,13 +105,16 @@ const oldroutes = [
105
{ path: '/relayers', component: Relayers },
106
]
107
108
+const delay = (t) => new Promise((r) => setTimeout(r, t))
109
+
110
const router = createRouter({
111
history: createWebHashHistory(),
112
routes,
- scrollBehavior (to, from, savedPosition) {
113
+ async scrollBehavior (to, from, savedPosition) {
114
if (savedPosition) {
115
return savedPosition
116
} else {
117
+ await delay(0)
118
return { top: 0, behavior: 'smooth'}
119
}
120
},
0 commit comments