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) {