Skip to content

Commit

Permalink
Use port if TX name is missing
Browse files Browse the repository at this point in the history
When running on Linux, the underlying library
does not report name of the ports, instead
you only see port itself (file path)
  • Loading branch information
kaack committed Aug 5, 2023
1 parent 29c9aff commit 26ad1ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webapp/src/components/misc/autocomplete.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ export const AutoCompleteFunctions = {
let transmitters = new Map();
try {
for (let transmitter of await getTransmitters()) {
transmitters.set(transmitter.getPort(), transmitter.getName());
let port = transmitter.getPort();
let name = transmitter.getName() || port;
if (!port) {
continue;
}
transmitters.set(port, name);
}
} catch (e) {
showError(`${i18n("error-msg-transmitters-not-loaded")}`);
Expand Down

0 comments on commit 26ad1ee

Please sign in to comment.