From 4331a583c4f2e70afba12f0236a9a35cba1fcb77 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Sun, 26 May 2024 23:01:21 +1000 Subject: [PATCH] Clear 'No ports discovered' message if a device is later hot plugged --- UI/renderer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/UI/renderer.js b/UI/renderer.js index 8b573bd..0332fb6 100644 --- a/UI/renderer.js +++ b/UI/renderer.js @@ -19,9 +19,8 @@ function refreshSerialPorts() serialport.list().then((ports) => { console.log('Serial ports found: ', ports); - if (ports.length === 0) { - document.getElementById('serialDetectError').textContent = 'No ports discovered' - } + if (ports.length === 0) { document.getElementById('serialDetectError').textContent = 'No ports discovered'; } + else { document.getElementById('serialDetectError').textContent = ''; } select = document.getElementById('portsSelect');