Skip to content

Commit d0bf33f

Browse files
author
Akos Kitta
committed
fix: let serialize the entire object
additional properties are never used when finding a match between the board+port config and detected items, but can distinguish between ambiguous items in the UI. Signed-off-by: Akos Kitta <[email protected]>
1 parent 639e133 commit d0bf33f

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

arduino-ide-extension/src/browser/boards/boards-service-provider.ts

+2-14
Original file line numberDiff line numberDiff line change
@@ -490,23 +490,11 @@ export class BoardsServiceProvider
490490
await Promise.all([
491491
this.setData(
492492
selectedBoardStorageKey,
493-
selectedBoard
494-
? // to make sure no other properties of the board object are persisted
495-
JSON.stringify({
496-
name: selectedBoard.name,
497-
fqbn: selectedBoard.fqbn,
498-
})
499-
: undefined
493+
selectedBoard ? JSON.stringify(selectedBoard) : undefined
500494
),
501495
this.setData(
502496
selectedPortStorageKey,
503-
selectedPort
504-
? // to make sure no other properties are persisted from the port object
505-
JSON.stringify({
506-
protocol: selectedPort.protocol,
507-
address: selectedPort.address,
508-
})
509-
: undefined
497+
selectedPort ? JSON.stringify(selectedPort) : undefined
510498
),
511499
this.setData(
512500
boardListHistoryStorageKey,

0 commit comments

Comments
 (0)