diff --git a/libs/inform/src/lib/services/modal/modal.service.ts b/libs/inform/src/lib/services/modal/modal.service.ts index b4b23399..5a3e9afe 100644 --- a/libs/inform/src/lib/services/modal/modal.service.ts +++ b/libs/inform/src/lib/services/modal/modal.service.ts @@ -44,8 +44,8 @@ export class NgxModalService { public open( options: NgxModalOptions ): Observable { - // Iben: If there still is an active subject running, the modal is still active and we early exit - if (!this.modalClosedSubject?.closed) { + // Iben: If there still is an active subject running, the modal is still active and we early exit. + if (this.modalClosedSubject !== undefined && !this.modalClosedSubject?.closed) { console.warn( 'NgxInform: An active modal is currently displayed, close the active modal before opening a new one' );