CODEBASE: Fix lint errors 2 (#1756)

This commit is contained in:
catloversg
2024-11-07 14:09:11 +07:00
committed by GitHub
parent e3c10e9f0f
commit 36c143b687
48 changed files with 267 additions and 146 deletions
+5 -2
View File
@@ -692,8 +692,11 @@ function getRunningScript(ctx: NetscriptContext, ident: ScriptIdentifier): Runni
return findRunningScriptByPid(ident);
} else {
const scripts = getRunningScriptsByArgs(ctx, ident.scriptname, ident.hostname, ident.args);
if (scripts === null) return null;
return scripts.values().next().value ?? null;
if (scripts === null) {
return null;
}
const next = scripts.values().next();
return !next.done ? next.value : null;
}
}