Fix for 0 values in line chart tooltip (#24658)

This commit is contained in:
Petar Petrov 2025-03-17 10:49:31 +02:00 committed by GitHub
parent 5f4cb9e3c1
commit 9d4df46d5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,7 +124,7 @@ export class StateHistoryChartLine extends LitElement {
const data = dataset.data || [];
for (let i = data.length - 1; i >= 0; i--) {
const point = data[i];
if (point && point[0] <= time && point[1]) {
if (point && point[0] <= time && typeof point[1] === "number") {
lastData = point;
break;
}