firmware/sagas: fix checksum validation

The checksum can be 0, so we can't be lazy and use `!checksum` to test
for undefined.

Issue: https://github.com/pybricks/support/issues/724#issuecomment-1295929316
This commit is contained in:
David Lechner
2022-10-29 14:05:31 -05:00
committed by David Lechner
parent 2d9a0ca39e
commit cb5101282b
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -309,7 +309,7 @@ function* loadFirmware(
}
})();
if (!checksum) {
if (checksum === undefined) {
// FIXME: we should return error/throw instead
yield* put(
didFailToFinish(
@@ -352,7 +352,7 @@ function* loadFirmware(
}
})();
if (!checksum) {
if (checksum === undefined) {
// FIXME: we should return error/throw instead
yield* put(
didFailToFinish(