Skip to content

Commit

Permalink
fix(projects): fix menu data when role is changed. fixed #391
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed May 7, 2024
1 parent 073fbcf commit 3b47b5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/modules/route/index.ts
Expand Up @@ -56,7 +56,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
const constantRoutes = shallowRef<ElegantConstRoute[]>([]);

function addConstantRoutes(routes: ElegantConstRoute[]) {
const constantRoutesMap = new Map(constantRoutes.value.map(route => [route.name, route]));
const constantRoutesMap = new Map<string, ElegantConstRoute>([]);

routes.forEach(route => {
constantRoutesMap.set(route.name, route);
Expand All @@ -69,7 +69,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
const authRoutes = shallowRef<ElegantConstRoute[]>([]);

function addAuthRoutes(routes: ElegantConstRoute[]) {
const authRoutesMap = new Map(authRoutes.value.map(route => [route.name, route]));
const authRoutesMap = new Map<string, ElegantConstRoute>([]);

routes.forEach(route => {
authRoutesMap.set(route.name, route);
Expand Down

0 comments on commit 3b47b5a

Please sign in to comment.