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 4718701 commit 811779eCopy full SHA for 811779e
src/app/shared/services/notification.service.ts
@@ -16,6 +16,15 @@ export class NotificationService {
16
17
public addNotification(message: string, duration?: number): void {
18
const notifications = this._notificationsSubject.getValue();
19
+
20
+ const existingNotification = notifications.find(
21
+ notification => notification.message === message
22
+ );
23
24
+ if (existingNotification) {
25
+ return;
26
+ }
27
28
const notification: INotification = {
29
id: this._notificationIdCounter++,
30
message,
0 commit comments