Don't log RAM calculator parse errors. Add semicolons and newlines when importing from URL in NSJS

This commit is contained in:
danielyxie
2018-10-03 15:24:32 -05:00
parent 561bbbd0a1
commit 097c866e6f
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -471,7 +471,7 @@ async function parseOnlyRamCalculate(server, code, workerScript) {
code = "";
for (const prop in module) {
if (typeof module[prop] === 'function') {
code += module[prop].toString();
code += module[prop].toString() + ";\n";
}
}
} catch(e) {
@@ -566,7 +566,7 @@ async function parseOnlyRamCalculate(server, code, workerScript) {
return ram;
} catch (error) {
console.info("parse or eval error: ", error);
// console.info("parse or eval error: ", error);
// This is not unexpected. The user may be editing a script, and it may be in
// a transitory invalid state.
return -1;