Skip to content

Commit 2f0e02f

Browse files
author
Alberto Iannaccone
authoredApr 27, 2021
Fix firmware info (#492)
* fix get firmware info * 2.4.7
1 parent f22498b commit 2f0e02f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arduino-create-agent-js-client",
3-
"version": "2.4.6",
3+
"version": "2.4.7",
44
"description": "JS module providing discovery of the Arduino Create Plugin and communication with it",
55
"main": "lib/index.js",
66
"module": "es/index.js",

‎src/firmware-updater.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ export default class FirmwareUpdater {
9191
if (!this.firmwareVersionData) {
9292
this.updating.next({ status: this.updateStatusEnum.ERROR, err: `Can't get firmware info: couldn't find version '${firmwareVersion}' for board '${boardId}'` });
9393
}
94+
else {
95+
firmwareInfoMessagesSubscription.unsubscribe();
96+
this.updating.next({ status: this.updateStatusEnum.GOT_INFO });
97+
}
9498
break;
9599
case 'Error':
96100
this.updating.next({ status: this.updateStatusEnum.ERROR, err: `Couldn't get firmware info: ${message.Msg}` });
97101
firmwareInfoMessagesSubscription.unsubscribe();
98102
break;
99-
case 'Done':
100-
firmwareInfoMessagesSubscription.unsubscribe();
101-
this.updating.next({ status: this.updateStatusEnum.GOT_INFO });
102-
break;
103103
default:
104104
break;
105105
}

0 commit comments

Comments
 (0)
Please sign in to comment.