fix potential null errors in recordData/graphPeakData

This commit is contained in:
Nick Krecklow
2020-05-20 19:56:10 -05:00
parent f4dadd9805
commit 05df7081e4
2 changed files with 22 additions and 6 deletions

View File

@ -132,7 +132,7 @@ class ServerRegistration {
let index = -1
for (let i = 0; i < this.graphData.length; i++) {
const point = this.graphData[i]
if (index === -1 || point > this.graphData[index]) {
if (point !== null && (index === -1 || point > this.graphData[index])) {
index = i
}
}