File tree 1 file changed +6
-1
lines changed
arduino-ide-extension/src/browser/boards
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -600,18 +600,23 @@ export class BoardsServiceProvider
600
600
boardsConfig . selectedBoard &&
601
601
availableBoards . every ( ( { selected } ) => ! selected )
602
602
) {
603
+ let port = boardsConfig . selectedPort
603
604
// If the selected board has the same port of an unknown board
604
605
// that is already in availableBoards we might get a duplicate port.
605
606
// So we remove the one already in the array and add the selected one.
606
607
const found = availableBoards . findIndex (
607
608
( board ) => board . port ?. address === boardsConfig . selectedPort ?. address
608
609
) ;
609
610
if ( found >= 0 ) {
611
+ // get the "Unknown board port" that we will substitute,
612
+ // then we can include it in the "availableBoard object"
613
+ // pushed below; to ensure addressLabel is included
614
+ port = availableBoards [ found ] . port
610
615
availableBoards . splice ( found , 1 ) ;
611
616
}
612
617
availableBoards . push ( {
613
618
...boardsConfig . selectedBoard ,
614
- port : boardsConfig . selectedPort ,
619
+ port,
615
620
selected : true ,
616
621
state : AvailableBoard . State . incomplete ,
617
622
} ) ;
You can’t perform that action at this time.
0 commit comments