visualizer: always use === for comparisons

This commit is contained in:
Simon Ruderich 2024-05-11 18:11:20 +02:00
parent d5fb4eee34
commit 51ae5d6785

View file

@ -265,7 +265,7 @@ function addHistory(packet) {
}
// Limit to historyMaxPackets items
const shift = chartHistoryHz.data.labels.length == historyMaxPackets;
const shift = chartHistoryHz.data.labels.length === historyMaxPackets;
if (shift) {
chartHistoryHz.data.labels.shift();
chartHistoryDb.data.labels.shift();
@ -276,7 +276,7 @@ function addHistory(packet) {
let i = 0;
for (const x of keys) {
let data = packet[x];
if (data == -1e38 /* "NaN" */) {
if (data === -1e38 /* "NaN" */) {
data = undefined;
}
if (shift) {