diff --git a/public/pages/AnomalyCharts/containers/AnomalyDetailsChart.tsx b/public/pages/AnomalyCharts/containers/AnomalyDetailsChart.tsx index 687b9462..ef078d93 100644 --- a/public/pages/AnomalyCharts/containers/AnomalyDetailsChart.tsx +++ b/public/pages/AnomalyCharts/containers/AnomalyDetailsChart.tsx @@ -396,7 +396,8 @@ export const AnomalyDetailsChart = React.memo( let annotations = [] as any[]; anomalies.forEach((anomalyTimeSeries: AnomalyData[]) => { annotations.push( - anomalyTimeSeries + Array.isArray(anomalyTimeSeries) ? ( + anomalyTimeSeries .filter((anomaly: AnomalyData) => anomaly.anomalyGrade > 0) .map((anomaly: AnomalyData) => ( { @@ -406,6 +407,7 @@ export const AnomalyDetailsChart = React.memo( }, details: `${JSON.stringify(anomaly)}` })) + ) : [] ); }); return annotations;