Skip to content

Commit

Permalink
Merge pull request #490 from HSLdevcom/DT-6627
Browse files Browse the repository at this point in the history
DT-6627 When alerts are removed the stopmonitor may crash
  • Loading branch information
Antiik91 authored Dec 17, 2024
2 parents be8d881 + c34441f commit c1588c9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ui/MonitorAlertRowStatic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ const MonitorAlertRowStatic: FC<IProps> = ({
return () => clearTimeout(id);
}, [current]);

const alertObject = alerts[alertIndex] || alerts[0];
const alert =
getServiceAlertDescription(
alerts[alertIndex],
alertObject,
languages[current % languages.length],
) ||
getServiceAlertHeader(
alerts[alertIndex],
languages[current % languages.length],
);
getServiceAlertHeader(alertObject, languages[current % languages.length]);

return (
<div className={cx('grid-row', 'alert static')}>
Expand Down

0 comments on commit c1588c9

Please sign in to comment.