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 @@ -600,18 +600,23 @@ export class BoardsServiceProvider
600600 boardsConfig . selectedBoard &&
601601 availableBoards . every ( ( { selected } ) => ! selected )
602602 ) {
603+ let port = boardsConfig . selectedPort
603604 // If the selected board has the same port of an unknown board
604605 // that is already in availableBoards we might get a duplicate port.
605606 // So we remove the one already in the array and add the selected one.
606607 const found = availableBoards . findIndex (
607608 ( board ) => board . port ?. address === boardsConfig . selectedPort ?. address
608609 ) ;
609610 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
610615 availableBoards . splice ( found , 1 ) ;
611616 }
612617 availableBoards . push ( {
613618 ...boardsConfig . selectedBoard ,
614- port : boardsConfig . selectedPort ,
619+ port,
615620 selected : true ,
616621 state : AvailableBoard . State . incomplete ,
617622 } ) ;
You can’t perform that action at this time.
0 commit comments