seimin 1 anno fa
parent
commit
c32967136f

+ 1 - 3
src/app/share/allocation-worker/allocation-worker.component.ts

@@ -14,9 +14,7 @@ export class AllocationWorkerComponent implements OnInit {
14 14
   ) {}
15 15
 
16 16
   ngOnInit() {
17
-    this.groupList = JSON.parse(
18
-      localStorage.getItem("user")
19
-    ).user.scope.groupIds;
17
+    this.groupList = JSON.parse(localStorage.getItem("user")).user.scope ? JSON.parse(localStorage.getItem("user")).user.scope.groupIds : [];
20 18
     this.getWorkerList();
21 19
   }
22 20
   // 配送人员数据