change(ui): fix alert reset

This commit is contained in:
nick-delirium 2023-02-02 18:15:05 +01:00
parent 59eabf8ba4
commit 1a22732a49

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