Skip to content

Commit

Permalink
Fix refreshing not clearing the list fully (#41)
Browse files Browse the repository at this point in the history
* Fix refreshing not clearing the list fully

* Another occurence of the same issue
  • Loading branch information
DeionSi authored May 6, 2024
1 parent 43396a1 commit a4b98bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UI/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function refreshSerialPorts()
select = document.getElementById('portsSelect');

//Clear the current options
for (i = 0; i <= select.options.length; i++)
while (select.options.length > 0)
{
select.remove(0); //Always 0 index (As each time an item is removed, everything shuffles up 1 place)
}
Expand Down Expand Up @@ -268,7 +268,7 @@ function requestPatternList()

//Clear the existing list
var select = document.getElementById('patternSelect')
for (i = 0; i <= select.options.length; i++)
while(select.options.length > 0)
{
select.remove(0); //Always 0 index (As each time an item is removed, everything shuffles up 1 place)
}
Expand Down

0 comments on commit a4b98bc

Please sign in to comment.