Skip to content

Commit 0a7f872

Browse files
perf: Frontend router
1 parent 0be1f2a commit 0a7f872

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

frontend/src/router/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,5 @@ const router = createRouter({
168168
},
169169
],
170170
})
171-
await watchRouter(router)
171+
watchRouter(router)
172172
export default router

frontend/src/router/watch.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const userStore = useUserStore()
66
const { wsCache } = useCache()
77
const whiteList = ['/login']
88
const assistantWhiteList = ['/assistant']
9-
export const watchRouter = async (router: any) => {
10-
await loadXpackStatic()
11-
LicenseGenerator.generateRouters(router)
9+
export const watchRouter = (router: any) => {
1210
router.beforeEach(async (to: any, from: any, next: any) => {
11+
await loadXpackStatic()
12+
LicenseGenerator.generateRouters(router)
1313
if (assistantWhiteList.includes(to.path)) {
1414
next()
1515
return

0 commit comments

Comments
 (0)