Skip to content

Commit

Permalink
Clear 'No ports discovered' message if a device is later hot plugged
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed May 26, 2024
1 parent eba0e5a commit 4331a58
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions UI/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 4331a58

Please sign in to comment.