We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83e6951 commit 373113dCopy full SHA for 373113d
src/modal/base-modal.service.ts
@@ -80,8 +80,10 @@ export class BaseModalService {
80
81
// Let animation finish before component is removed
82
setTimeout(() => {
83
- this.placeholderService.destroyComponent(BaseModalService.modalList[index]);
84
- BaseModalService.modalList.splice(index, 1);
+ if (BaseModalService.modalList[index]) {
+ this.placeholderService.destroyComponent(BaseModalService.modalList[index]);
85
+ BaseModalService.modalList.splice(index, 1);
86
+ }
87
}, 240);
88
}
89
0 commit comments