mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
Don't log RAM calculator parse errors. Add semicolons and newlines when importing from URL in NSJS
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user