Skip to content

Commit

Permalink
Make sure not to access non-existent properties on push progress as s…
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoTheThird committed Dec 1, 2020
1 parent dccb893 commit 90522e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adb.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class Adb extends Tool {
if (str.includes("writex")) {
// writex namespace indicates external writing
pushedSize +=
parseInt(str.split("len=")[1].split(" ")[0]) || 0;
parseInt(str?.split("len=")[1]?.split(" ")[0]) || 0;
progress(Math.min(pushedSize / totalSize, 1));
}
} else {
Expand Down

0 comments on commit 90522e4

Please sign in to comment.