From 0c9e50c7dab7dc465813e7f0b62a96516ea75c8a Mon Sep 17 00:00:00 2001 From: Barak Kakoun Date: Thu, 26 Mar 2020 20:30:31 +0200 Subject: [PATCH] All endpoints deleted (#23113) because id is never defined on notification object, the condition 'n.id === an.id' is equal to 'undefined === undefined' which is always true. that code is responsible for the situation when you delete one endpoint and it removes all of them. --- public/app/features/alerting/AlertTabCtrl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/alerting/AlertTabCtrl.ts b/public/app/features/alerting/AlertTabCtrl.ts index 9a0baf00b75..030e2959cf8 100644 --- a/public/app/features/alerting/AlertTabCtrl.ts +++ b/public/app/features/alerting/AlertTabCtrl.ts @@ -168,8 +168,8 @@ export class AlertTabCtrl { removeNotification(an: any) { // remove notifiers refeered to by id and uid to support notifiers added // before and after we added support for uid - _.remove(this.alert.notifications, (n: any) => n.uid === an.uid || n.id === an.id); - _.remove(this.alertNotifications, (n: any) => n.uid === an.uid || n.id === an.id); + _.remove(this.alert.notifications, (n: any) => n.uid === an.uid); + _.remove(this.alertNotifications, (n: any) => n.uid === an.uid); } addAlertRuleTag() {