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 fetchPorts = async () => {
|
||||||
const data = await SerialPort.list();
|
const data = await SerialPort.list();
|
||||||
options.forEach(() => {
|
options.splice(0, options.length);
|
||||||
options.shift();
|
|
||||||
});
|
|
||||||
data.forEach((comPort) => { options.push({ key: comPort.path, text: comPort.path }); });
|
data.forEach((comPort) => { options.push({ key: comPort.path, text: comPort.path }); });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in a new issue