Skip to content

Commit 3b47b5a

Browse files
committed
fix(projects): fix menu data when role is changed. fixed #391
1 parent 073fbcf commit 3b47b5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/store/modules/route/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
5656
const constantRoutes = shallowRef<ElegantConstRoute[]>([]);
5757

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

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

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

7474
routes.forEach(route => {
7575
authRoutesMap.set(route.name, route);

0 commit comments

Comments
 (0)