Skip to content

Commit 624abbe

Browse files
silvanocerzaAlberto Iannaccone
authored and
Alberto Iannaccone
committed
Fix serial upload not working with all boards
1 parent 97399cf commit 624abbe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arduino-ide-extension/src/browser/contributions/upload-sketch.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,9 @@ export class UploadSketch extends SketchContribution {
230230
const optimizeForDebug = this.editorMode.compileForDebug;
231231
const { selectedPort } = boardsConfig;
232232
const port = selectedPort;
233-
const userFields = this.cachedUserFields.get(this.selectedFqbnAddress());
234-
if (!userFields) {
233+
const userFields =
234+
this.cachedUserFields.get(this.selectedFqbnAddress()) ?? [];
235+
if (userFields.length === 0 && this.boardRequiresUserFields) {
235236
this.messageService.error(
236237
nls.localize(
237238
'arduino/sketch/userFieldsNotFoundError',

0 commit comments

Comments
 (0)