Skip to content

Commit

Permalink
Fix firmware info (#492)
Browse files Browse the repository at this point in the history
* fix get firmware info

* 2.4.7
  • Loading branch information
Alberto Iannaccone authored Apr 27, 2021
1 parent f22498b commit 2f0e02f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arduino-create-agent-js-client",
"version": "2.4.6",
"version": "2.4.7",
"description": "JS module providing discovery of the Arduino Create Plugin and communication with it",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/firmware-updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ export default class FirmwareUpdater {
if (!this.firmwareVersionData) {
this.updating.next({ status: this.updateStatusEnum.ERROR, err: `Can't get firmware info: couldn't find version '${firmwareVersion}' for board '${boardId}'` });
}
else {
firmwareInfoMessagesSubscription.unsubscribe();
this.updating.next({ status: this.updateStatusEnum.GOT_INFO });
}
break;
case 'Error':
this.updating.next({ status: this.updateStatusEnum.ERROR, err: `Couldn't get firmware info: ${message.Msg}` });
firmwareInfoMessagesSubscription.unsubscribe();
break;
case 'Done':
firmwareInfoMessagesSubscription.unsubscribe();
this.updating.next({ status: this.updateStatusEnum.GOT_INFO });
break;
default:
break;
}
Expand Down

0 comments on commit 2f0e02f

Please sign in to comment.