From b443721617fcc102c5b3d3a5cbf7b5e1bcbc4f8a Mon Sep 17 00:00:00 2001 From: Tom B <5631509+track0x1@users.noreply.github.com> Date: Thu, 30 May 2024 15:07:58 -0400 Subject: [PATCH] Completely hide GPU from Statusbar when unsupported --- web/src/components/Statusbar.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/components/Statusbar.tsx b/web/src/components/Statusbar.tsx index 01a2ba225..41bd9372f 100644 --- a/web/src/components/Statusbar.tsx +++ b/web/src/components/Statusbar.tsx @@ -81,6 +81,10 @@ export default function Statusbar() { const gpu = parseInt(stats.gpu); + if (isNaN(gpu)) { + return; + } + return ( {" "} @@ -97,7 +101,7 @@ export default function Statusbar() { : "text-danger" }`} /> - {gpuTitle} {isNaN(gpu) ? 'unknown' : `${gpu}%`} + {gpuTitle} {gpu}% );