change(ui): fix alert reset

This commit is contained in:
nick-delirium 2023-02-02 18:15:05 +01:00 committed by Taha Yassine Kraiem
parent 06cada3404
commit cba5936044

View file

@ -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]);