Fix port being displayed multiple times
This commit is contained in:
parent
a5afa72620
commit
622afc9afb
1 changed files with 1 additions and 3 deletions
|
@ -56,9 +56,7 @@ const options: IComboBoxOption[] = [
|
|||
|
||||
const fetchPorts = async () => {
|
||||
const data = await SerialPort.list();
|
||||
options.forEach(() => {
|
||||
options.shift();
|
||||
});
|
||||
options.splice(0, options.length);
|
||||
data.forEach((comPort) => { options.push({ key: comPort.path, text: comPort.path }); });
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue