From cba593604468d8f650cd21ac1a006589fab9b8e5 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Thu, 2 Feb 2023 18:15:05 +0100 Subject: [PATCH] change(ui): fix alert reset --- .../app/components/Dashboard/components/Alerts/NewAlert.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx b/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx index 258b550cd..97319e938 100644 --- a/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx +++ b/frontend/app/components/Dashboard/components/Alerts/NewAlert.tsx @@ -96,7 +96,9 @@ const NewAlert = (props: IProps) => { const alertId = location.pathname.split('/').pop(); const currentAlert = list .find((alert: Alert) => alert.alertId === String(alertId)); - init(currentAlert || {}); + if (currentAlert) { + init(currentAlert) + } } }, [list]);