From 530231a5cba3ee0c2a1ce5854e2af398ae88d0b9 Mon Sep 17 00:00:00 2001 From: chansee97 Date: Sat, 8 Jun 2024 09:23:47 +0800 Subject: [PATCH] fix: check `appRoot` --- src/store/router/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/router/index.ts b/src/store/router/index.ts index 6c1ad3f..e94892d 100644 --- a/src/store/router/index.ts +++ b/src/store/router/index.ts @@ -28,7 +28,8 @@ export const useRouteStore = defineStore('route-store', { this.$reset() }, resetRoutes() { - router.removeRoute('appRoot') + if (router.hasRoute('appRoot')) + router.removeRoute('appRoot') }, // set the currently highlighted menu key setActiveMenu(key: string) {