diff --git a/comms.js b/comms.js index 6bbf3ef26..a5f0569d8 100644 --- a/comms.js +++ b/comms.js @@ -19,9 +19,9 @@ uploadApp : app => { // Load all files Promise.all(app.storage.map(storageFile => httpGet("apps/"+storageFile.file) // map each file to a command to load into storage - .then(contents=>`\x10require('Storage').write(${toJS(storageFile.name)},${storageFile.evaluate ? contents : toJS(contents)});`))) + .then(contents=>`\x10require('Storage').write(${toJS(storageFile.name)},${storageFile.evaluate ? contents.trim() : toJS(contents)});`))) .then(function(fileContents) { - fileContents = fileContents.join("\n"); + fileContents = fileContents.join("\n")+"\n"; console.log("uploadApp",fileContents); // reset to ensure we have enough memory to upload what we need to Puck.write("\x03reset();\n", function() { diff --git a/index.html b/index.html index e881dc32a..e90d9c3fa 100644 --- a/index.html +++ b/index.html @@ -88,7 +88,7 @@ - +