Skip to content

Commit 72979ea

Browse files
authored
Merge pull request #602 from markewallace/fix_587
Fix: NotificationService does not remove references to closed notifications
2 parents 21f5137 + 01268b1 commit 72979ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/notification/notification.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ export class NotificationService implements OnDestroy {
144144
setTimeout( () => {
145145
this.applicationRef.detachView(notificationRef.hostView);
146146
notificationRef.destroy();
147+
const index = this.notificationRefs.indexOf(notificationRef);
148+
if (index !== -1) {
149+
this.notificationRefs.splice(index, 1);
150+
}
147151
}, 200);
148152
}
149153
}

0 commit comments

Comments
 (0)