Skip to content

Commit cf08a6a

Browse files
fix: Resolve white screen on data source page refresh
1 parent 19e9058 commit cf08a6a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

frontend/src/router/watch.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,15 @@ export const watchRouter = (router: Router) => {
3434
next('/login')
3535
return
3636
}
37+
let isFirstDynamicPath = false
3738
if (!userStore.getUid) {
3839
await userStore.info()
3940
generateDynamicRouters(router)
41+
isFirstDynamicPath = to?.path === '/ds/index'
42+
if (isFirstDynamicPath) {
43+
next({ ...to, replace: true })
44+
return
45+
}
4046
}
4147
if (to.path === '/' || accessCrossPermission(to)) {
4248
next('/chat')

0 commit comments

Comments
 (0)