seimin пре 3 година
родитељ
комит
e8c7233c04
1 измењених фајлова са 5 додато и 3 уклоњено
  1. 5 3
      src/app/views/task-type-management/task-type-management.component.ts

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

@@ -1806,9 +1806,11 @@ export class TaskTypeManagementComponent implements OnInit {
1806 1806
       .subscribe((result) => {
1807 1807
         this.searchTaskLoading = false;
1808 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 1814
           this.searchTaskList.forEach((item) => {
1813 1815
             item.id = `${item.id}__${item.taskName}`;
1814 1816
           });