File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
arduino-ide-extension/src/browser/boards Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -578,18 +578,23 @@ export class BoardsServiceProvider implements FrontendApplicationContribution {
578
578
boardsConfig . selectedBoard &&
579
579
availableBoards . every ( ( { selected } ) => ! selected )
580
580
) {
581
+ let port = boardsConfig . selectedPort
581
582
// If the selected board has the same port of an unknown board
582
583
// that is already in availableBoards we might get a duplicate port.
583
584
// So we remove the one already in the array and add the selected one.
584
585
const found = availableBoards . findIndex (
585
586
( board ) => board . port ?. address === boardsConfig . selectedPort ?. address
586
587
) ;
587
588
if ( found >= 0 ) {
589
+ // get the "Unknown board port" that we will substitute,
590
+ // then we can include it in the "availableBoard object"
591
+ // pushed below; to ensure addressLabel is included
592
+ port = availableBoards [ found ] . port
588
593
availableBoards . splice ( found , 1 ) ;
589
594
}
590
595
availableBoards . push ( {
591
596
...boardsConfig . selectedBoard ,
592
- port : boardsConfig . selectedPort ,
597
+ port,
593
598
selected : true ,
594
599
state : AvailableBoard . State . incomplete ,
595
600
} ) ;
You can’t perform that action at this time.
0 commit comments