Skip to content

Commit

Permalink
fix: Revert Test if active before reducing number of active toasts #922
Browse files Browse the repository at this point in the history
… (#926)

This reverts commit 1d96d32. Fixes #928
  • Loading branch information
scttcper committed Apr 12, 2022
1 parent 1d96d32 commit eb92b40
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/toastr/toastr.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit eb92b40

Please sign in to comment.