Showing
1 changed file
with
1 additions
and
1 deletions
@@ -224,7 +224,7 @@ export const usePermissionStore = defineStore({ | @@ -224,7 +224,7 @@ export const usePermissionStore = defineStore({ | ||
224 | // !Simulate to obtain permission codes from the background, | 224 | // !Simulate to obtain permission codes from the background, |
225 | // this function may only need to be executed once, and the actual project can be put at the right time by itself | 225 | // this function may only need to be executed once, and the actual project can be put at the right time by itself |
226 | let routeList: AppRouteRecordRaw[] = []; | 226 | let routeList: AppRouteRecordRaw[] = []; |
227 | - const userInfo: any = getAuthCache(USER_INFO_KEY); | 227 | + const userInfo: any = getAuthCache(USER_INFO_KEY) || { roles: [] }; |
228 | const filterMenu = (allMenuList, menuIdsList) => { | 228 | const filterMenu = (allMenuList, menuIdsList) => { |
229 | return allMenuList | 229 | return allMenuList |
230 | .filter((item) => { | 230 | .filter((item) => { |