Handle case ECU is not in message (#111)
This commit is contained in:
@@ -98,7 +98,7 @@ export const CarUpdatesProvider = ({ children }) => {
|
|||||||
if (validateStatusMessage(status)) {
|
if (validateStatusMessage(status)) {
|
||||||
if (status.msg === "downloading") {
|
if (status.msg === "downloading") {
|
||||||
item.progress = getDownloadProgress(status);
|
item.progress = getDownloadProgress(status);
|
||||||
item.status = `downloading ${item.ecu} ${item.progress}%`;
|
item.status = `${item.ecu || ""} downloading ${item.progress}%`.trim();
|
||||||
return;
|
return;
|
||||||
} else if (status.msg === "package_download_complete") {
|
} else if (status.msg === "package_download_complete") {
|
||||||
item.progress = 100;
|
item.progress = 100;
|
||||||
@@ -106,7 +106,7 @@ export const CarUpdatesProvider = ({ children }) => {
|
|||||||
return;
|
return;
|
||||||
} else if (status.msg === "installing") {
|
} else if (status.msg === "installing") {
|
||||||
item.progress = getInstallProgress(status);
|
item.progress = getInstallProgress(status);
|
||||||
item.status = `installing ${item.ecu} ${item.progress}%`;
|
item.status = `${item.ecu || ""} installing ${item.progress}%`.trim();
|
||||||
return;
|
return;
|
||||||
} else if (status.msg === "package_install_complete") {
|
} else if (status.msg === "package_install_complete") {
|
||||||
item.progress = 100;
|
item.progress = 100;
|
||||||
|
|||||||
Reference in New Issue
Block a user