Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9351f5f

Browse files
author
Akos Kitta
committedFeb 8, 2024
fix(test): omit reason from event if undefined
Signed-off-by: Akos Kitta <[email protected]>
1 parent 7924adf commit 9351f5f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,11 @@ export class BoardsServiceProvider
387387
this._boardsConfig.selectedPort = event.selectedPort;
388388
}
389389

390-
this.boardsConfigDidChangeEmitter.fire(Object.assign(event, { reason }));
390+
if (reason) {
391+
event = Object.assign(event, { reason });
392+
}
393+
394+
this.boardsConfigDidChangeEmitter.fire(event);
391395
this.refreshBoardList();
392396
this.saveState();
393397
return true;

0 commit comments

Comments
 (0)
Please sign in to comment.