mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-09 10:28:32 +00:00
do not await for attached boards.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -105,7 +105,7 @@ export class BoardsConfig extends React.Component<BoardsConfig.Props, BoardsConf
|
||||
this.queryPorts(Promise.resolve({ boards })).then(({ knownPorts }) => {
|
||||
let { selectedPort } = this.state;
|
||||
const removedPorts = detachedBoards.filter(AttachedSerialBoard.is).map(({ port }) => port);
|
||||
if (!!selectedPort && removedPorts.indexOf(selectedPort) === -1) {
|
||||
if (!!selectedPort && removedPorts.indexOf(selectedPort) !== -1) {
|
||||
selectedPort = undefined;
|
||||
}
|
||||
this.setState({ knownPorts, selectedPort }, () => this.fireConfigChanged());
|
||||
|
||||
@@ -34,7 +34,7 @@ export class BoardsServiceClientImpl implements BoardsServiceClient {
|
||||
const { selectedPort, selectedBoard } = this.boardsConfig;
|
||||
this.onAttachedBoardsChangedEmitter.fire(event);
|
||||
// Dynamically unset the port if the selected board was an attached one and we detached it.
|
||||
if (!!selectedPort && detachedBoards.indexOf(selectedPort) === -1) {
|
||||
if (!!selectedPort && detachedBoards.indexOf(selectedPort) !== -1) {
|
||||
this.boardsConfig = {
|
||||
selectedBoard,
|
||||
selectedPort: undefined
|
||||
|
||||
Reference in New Issue
Block a user