diff --git a/src/lib/toastr/toastr.service.ts b/src/lib/toastr/toastr.service.ts index 3ce0dacc..d936dfdc 100644 --- a/src/lib/toastr/toastr.service.ts +++ b/src/lib/toastr/toastr.service.ts @@ -113,9 +113,7 @@ export class ToastrService { } found.activeToast.toastRef.close(); this.toasts.splice(found.index, 1); - if(this.toasts[this.currentlyActive]) { - this.currentlyActive = this.currentlyActive - 1; - } + this.currentlyActive = this.currentlyActive - 1; if (!this.toastrConfig.maxOpened || !this.toasts.length) { return false; }