Skip to content

Commit

Permalink
fix failed unit tests (#303) (#304)
Browse files Browse the repository at this point in the history
Signed-off-by: Jackie Han <[email protected]>
(cherry picked from commit 77c0931)

Co-authored-by: Jackie Han <[email protected]>
  • Loading branch information
1 parent 8854f55 commit c09dc68
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 c09dc68

Please sign in to comment.