diff --git a/src/components/measurements/measurementsD3.js b/src/components/measurements/measurementsD3.js index ccd158e08..a387e6fad 100644 --- a/src/components/measurements/measurementsD3.js +++ b/src/components/measurements/measurementsD3.js @@ -197,8 +197,9 @@ export const drawMeasurementsSVG = (ref, xAxisRef, svgData) => { drawStickyXAxis(xAxisRef, containerHeight, svgHeight, xScale, x_axis_label); // Add threshold(s) if provided - if (thresholds !== null && thresholds !== undefined) { + if (Array.isArray(thresholds)) { for (const threshold of thresholds) { + if (typeof threshold !== "number") continue; const thresholdXValue = xScale(threshold); svg.append("line") .attr("class", classes.threshold)