Skip to content

Commit

Permalink
fix failed unit tests (opensearch-project#303)
Browse files Browse the repository at this point in the history
Signed-off-by: Jackie Han <[email protected]>
  • Loading branch information
jackiehanyang authored Aug 9, 2022
1 parent 45a56ee commit 77c0931
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => (
{
Expand All @@ -406,6 +407,7 @@ export const AnomalyDetailsChart = React.memo(
},
details: `${JSON.stringify(anomaly)}`
}))
) : []
);
});
return annotations;
Expand Down

0 comments on commit 77c0931

Please sign in to comment.