Skip to content

Commit 7dab798

Browse files
author
Alberto Iannaccone
committed
fix get firmware info
1 parent 1297535 commit 7dab798

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)