Skip to content

Commit ea6bab0

Browse files
committed
clear api stack after all api calls result processed
Signed-off-by: Mohd. Shariq <[email protected]>
1 parent 1cdd7bc commit ea6bab0

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/app/components/core/north/north-task-modal/north-task-modal.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,12 @@ export class NorthTaskModalComponent implements OnInit, OnChanges {
572572
}
573573
} else {
574574
this.response.handleResponseMessage(r.type);
575-
this.notify.emit();
576-
this.toggleModal(false);
577-
this.form.reset();
578-
this.apiCallsStack = [];
579575
}
580-
})
576+
});
577+
this.notify.emit();
578+
this.toggleModal(false);
579+
this.form.reset();
580+
this.apiCallsStack = [];
581581
});
582582
} else {
583583
this.toggleModal(false);

src/app/components/core/south/south-service-modal/south-service-modal.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ export class SouthServiceModalComponent implements OnInit {
580580
if (this.apiCallsStack.length > 0) {
581581
this.ngProgress.start();
582582
forkJoin(this.apiCallsStack).subscribe((result) => {
583+
console.log('result', result);
583584
result.forEach((r: any) => {
584585
this.ngProgress.done();
585586
if (r.failed) {
@@ -590,11 +591,11 @@ export class SouthServiceModalComponent implements OnInit {
590591
}
591592
} else {
592593
this.response.handleResponseMessage(r.type);
593-
this.notify.emit();
594-
this.toggleModal(false);
595-
this.apiCallsStack = [];
596594
}
597-
})
595+
});
596+
this.notify.emit();
597+
this.toggleModal(false);
598+
this.apiCallsStack = [];
598599
});
599600
} else {
600601
this.toggleModal(false);

0 commit comments

Comments
 (0)