Finished wget() Netscript fn implementation. Updated documentation

This commit is contained in:
danielyxie
2018-09-27 23:19:52 -05:00
parent 44ce4bc674
commit a7592250f3
5 changed files with 39 additions and 30 deletions
+3 -4
View File
@@ -518,12 +518,11 @@ function parseOnlyRamCalculate(server, code, workerScript) {
if (typeof func === "function") {
try {
let res;
if (func instance of (async () => {}).constructor) {
if (func.constructor.name === "AsyncFunction") {
res = 0; // Async functions will always be 0 RAM
} else {
res = func.apply(null, []);
}
let res = func.apply(null, []);
if (typeof res === "number") {
return res;
}