From 570c379bc5d054bf12d93219f7848cf9c9354017 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 11 May 2024 18:11:20 +0200 Subject: [PATCH] visualizer: always use === for comparisons --- impl/utils/visualizer/static/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/impl/utils/visualizer/static/index.js b/impl/utils/visualizer/static/index.js index ba58416..534758e 100644 --- a/impl/utils/visualizer/static/index.js +++ b/impl/utils/visualizer/static/index.js @@ -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) {