Browse Source

BUG修复

seimin 3 years ago
parent
commit
e8c7233c04

+ 5 - 3
src/app/views/task-type-management/task-type-management.component.ts

@@ -1806,9 +1806,11 @@ export class TaskTypeManagementComponent implements OnInit {
1806
       .subscribe((result) => {
1806
       .subscribe((result) => {
1807
         this.searchTaskLoading = false;
1807
         this.searchTaskLoading = false;
1808
         if (result.status == 200) {
1808
         if (result.status == 200) {
1809
-          this.searchTaskList = result.list.filter(
1810
-            (item) => item.id != this.currentChoice.id
1811
-          );
1809
+          if (this.currentChoice) {
1810
+            this.searchTaskList = result.list.filter(
1811
+              (item) => item.id != this.currentChoice.id
1812
+            );
1813
+          }
1812
           this.searchTaskList.forEach((item) => {
1814
           this.searchTaskList.forEach((item) => {
1813
             item.id = `${item.id}__${item.taskName}`;
1815
             item.id = `${item.id}__${item.taskName}`;
1814
           });
1816
           });