fix bug with hacknet servers and grow

This commit is contained in:
Olivier Gagnon 2021-10-05 15:23:30 -04:00
parent f579ee398b
commit a420a87eba
3 changed files with 4 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -836,9 +836,8 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
} }
const host = getServer(workerScript.serverIp); const host = getServer(workerScript.serverIp);
if (!(host instanceof Server)) { if (host === null) {
workerScript.log("grow", "Cannot be executed on this server."); throw new Error("Workerscript host is null");
return false;
} }
// No root access or skill level too low // No root access or skill level too low