run formater

This commit is contained in:
TheMas3212 2022-04-12 08:27:53 +10:00
parent 8d5632eb3e
commit 433873c5e2
No known key found for this signature in database
GPG Key ID: 62A173A4FDA683CA

@ -119,13 +119,13 @@ function startNetscript2Script(player: IPlayer, workerScript: WorkerScript): Pro
function wrapObject(vars: any, ...tree: string[]): void { function wrapObject(vars: any, ...tree: string[]): void {
for (const prop of Object.keys(vars)) { for (const prop of Object.keys(vars)) {
switch (typeof vars[prop]) { switch (typeof vars[prop]) {
case 'function': { case "function": {
vars[prop] = wrap([...tree, prop].join('.'), vars[prop]); vars[prop] = wrap([...tree, prop].join("."), vars[prop]);
break; break;
} }
case 'object': { case "object": {
if (Array.isArray(vars[prop])) continue; if (Array.isArray(vars[prop])) continue;
wrapObject(vars[prop], ...tree, prop) wrapObject(vars[prop], ...tree, prop);
break; break;
} }
} }