Skip to content

Commit 36115a3

Browse files
author
Akos Kitta
committed
fix: monitor does not start if not connected
1 parent 95b34b8 commit 36115a3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Diff for: arduino-ide-extension/src/browser/monitor-manager-proxy-client-impl.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,16 @@ export class MonitorManagerProxyClientImpl
166166
);
167167
}
168168

169-
const { selectedBoard, selectedPort } =
170-
this.boardsServiceProvider.boardsConfig;
171-
if (!selectedBoard || !selectedBoard.fqbn || !selectedPort) return;
169+
if (!this.lastConnectedBoard || !this.lastConnectedBoard.board) {
170+
return;
171+
}
172172
try {
173173
this.clearVisibleNotification();
174-
await this.server().startMonitor(selectedBoard, selectedPort, settings);
174+
await this.server().startMonitor(
175+
this.lastConnectedBoard.board,
176+
this.lastConnectedBoard.port,
177+
settings
178+
);
175179
} catch (err) {
176180
const message = ApplicationError.is(err) ? err.message : String(err);
177181
this.previousNotificationId = this.notificationId(message);

0 commit comments

Comments
 (0)