File tree 1 file changed +10
-3
lines changed
arduino-ide-extension/src/browser/boards
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,21 @@ export class BoardsServiceProvider implements FrontendApplicationContribution {
128
128
return ;
129
129
}
130
130
131
- const lastSelectionOnUpload = this . lastBoardsConfigOnUpload ;
132
- this . setLastBoardsConfigOnUpload ( undefined ) ;
133
-
134
131
const {
135
132
oldState : { ports : oldPorts } ,
136
133
newState : { ports : newPorts , boards : newBoards } ,
137
134
} = event ;
138
135
136
+ if ( newPorts . length === 0 ) {
137
+ setTimeout ( ( ) => {
138
+ this . setLastBoardsConfigOnUpload ( undefined ) ;
139
+ } , 5000 ) ;
140
+ return ;
141
+ }
142
+
143
+ const lastSelectionOnUpload = this . lastBoardsConfigOnUpload ;
144
+ this . setLastBoardsConfigOnUpload ( undefined ) ;
145
+
139
146
const appearedPorts = newPorts . filter ( ( newPort : Port ) =>
140
147
oldPorts . every ( ( oldPort : Port ) => ! Port . sameAs ( newPort , oldPort ) )
141
148
) ;
You can’t perform that action at this time.
0 commit comments