diff --git a/renderer.js b/renderer.js index 2ae2182..ceaa87b 100644 --- a/renderer.js +++ b/renderer.js @@ -49,7 +49,7 @@ function refreshSerialPorts() select = document.getElementById('portsSelect'); //Clear the current options - for (i = 0; i <= select.options.length; i++) + while (select.options.length) { select.remove(0); //Always 0 index (As each time an item is removed, everything shuffles up 1 place) }