Browse Source

新增undefined 判断

zhulu 10 months ago
parent
commit
fe22354800
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/store/modules/user.js

+ 1 - 1
src/store/modules/user.js

@@ -12,7 +12,7 @@ const state = {
   //机构类型
   orgType:JSON.parse(sessionStorage.getItem("SET_USER_ORGTYPE"))||null,
 
-  subUserList:JSON.parse(sessionStorage.getItem("SET_USER_SUBUSERLIST"))||[],
+  subUserList:(sessionStorage.getItem("SET_USER_SUBUSERLIST")!='' && sessionStorage.getItem("SET_USER_SUBUSERLIST")!=null && sessionStorage.getItem("SET_USER_SUBUSERLIST")!='undefined') ? JSON.parse(sessionStorage.getItem("SET_USER_SUBUSERLIST"))||[]:[],
 
   //主用户用户名
   masterUserName: JSON.parse(sessionStorage.getItem("SET_MASTER_USER_NAME"))||null,