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 fa41d8c

Browse files
author
Alberto Iannaccone
committedApr 27, 2021
fix get firmware info
1 parent f22498b commit fa41d8c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/firmware-updater.js

Lines changed: 4 additions & 4 deletions
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.