From 059839525a92fc8ae06a436430f4b0a33e7cabf5 Mon Sep 17 00:00:00 2001 From: Georg Sieber Date: Tue, 19 Apr 2022 14:47:13 +0200 Subject: [PATCH] fix graph if value is NaN (e.g. if GPU is selected but no NVIDIA card detected) --- files/system-monitor-graph@rcassani/desklet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/system-monitor-graph@rcassani/desklet.js b/files/system-monitor-graph@rcassani/desklet.js index 623df33..72beb9f 100644 --- a/files/system-monitor-graph@rcassani/desklet.js +++ b/files/system-monitor-graph@rcassani/desklet.js @@ -216,7 +216,7 @@ SystemMonitorGraph.prototype = { } // concatenate new value - values.push(value); + values.push(isNaN(value) ? 0 : value); values.shift(); this.values = values;