Fix issue uploading then cancelling custom app

master
Gordon Williams 2020-03-04 16:40:25 +00:00
parent b93c094340
commit 7f27796093
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ Puck.debug=3;
var Comms = {
reset : () => new Promise((resolve,reject) => {
Puck.write("\x03\x10reset();\n", (result) => {
if (result===null) return reject("");
if (result===null) return reject("Connection failed");
setTimeout(resolve,500);
});
}),
@ -42,7 +42,7 @@ uploadApp : (app,skipReset) => {
doUpload();
} else {
// reset to ensure we have enough memory to upload what we need to
Comms.reset().then(doUpload)
Comms.reset().then(doUpload, reject)
}
});
});