Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit b6954f0

Browse files
authored
fix install board command issue (#542)
1 parent 0356dbb commit b6954f0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/extension.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,14 @@ export async function activate(context: vscode.ExtensionContext) {
169169
let installed = false;
170170
const installedBoards = ArduinoContext.boardManager.installedBoards;
171171
installedBoards.forEach((board: IBoard, key: string) => {
172-
if (packageName === board.platform.package.name &&
172+
let _packageName: string;
173+
if (board.platform.package && board.platform.package.name) {
174+
_packageName = board.platform.package.name;
175+
} else {
176+
_packageName = board.platform.packageName;
177+
}
178+
179+
if (packageName === _packageName &&
173180
arch === board.platform.architecture &&
174181
(!version || version === board.platform.installedVersion)) {
175182
installed = true;

0 commit comments

Comments
 (0)