Skip to content

Commit cc90a6e

Browse files
committed
Add nullcheck
1 parent ee5bf55 commit cc90a6e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/drawFunction.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -755,10 +755,12 @@ window.draw = (props) => {
755755
.html(measurementName)
756756
}
757757
758-
const noData = !points.find(isDefined)
759-
selectOrAppend(valuesHolder, 'span', 'highlightvalue' + index)
760-
.style('color', color)
761-
.html(noData ? props.noDataString : '')
758+
if (valuesHolder !== null) {
759+
const noData = !points.find(isDefined)
760+
selectOrAppend(valuesHolder, 'span', 'highlightvalue' + index)
761+
.style('color', color)
762+
.html(noData ? props.noDataString : '')
763+
}
762764
763765
const highlightCroshair = selectOrAppend(
764766
selectOrAppend(svg, 'g', 'crosshair' + index),

0 commit comments

Comments
 (0)