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