Skip to content

Commit febf70a

Browse files
committed
Fix serial upload not working with all boards
1 parent b4d5e78 commit febf70a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ export class UploadSketch extends SketchContribution {
232232
const optimizeForDebug = this.editorMode.compileForDebug;
233233
const { selectedPort } = boardsConfig;
234234
const port = selectedPort;
235-
const userFields = this.cachedUserFields.get(this.selectedFqbnAddress());
236-
if (!userFields) {
235+
const userFields = this.cachedUserFields.get(this.selectedFqbnAddress()) ?? [] as BoardUserField[];
236+
if (userFields.length === 0 && this.boardRequiresUserFields) {
237237
this.messageService.error(nls.localize('arduino/sketch/userFieldsNotFoundError', "Can't find user fields for connected board"));
238238
return;
239239
}

0 commit comments

Comments
 (0)