From 622afc9afba86cbe96457e4db54a18e58e9a547c Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Tue, 15 Mar 2022 09:08:59 +0100 Subject: [PATCH] Fix port being displayed multiple times --- Dashboard/src/Components/Settings.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dashboard/src/Components/Settings.tsx b/Dashboard/src/Components/Settings.tsx index ffcd9a9..b322cb7 100644 --- a/Dashboard/src/Components/Settings.tsx +++ b/Dashboard/src/Components/Settings.tsx @@ -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 }); }); };