diff --git a/src/Electron.tsx b/src/Electron.tsx index 50811ded7..9fa98afc5 100644 --- a/src/Electron.tsx +++ b/src/Electron.tsx @@ -36,8 +36,8 @@ function initWebserver(): void { if (home === null) { return { res: false, - msg: "Home server does not exist." - } + msg: "Home server does not exist.", + }; } return { res: true, @@ -45,11 +45,10 @@ function initWebserver(): void { files: home.scripts.map((script) => ({ filename: script.filename, code: script.code, - hash: script.hash(), - ramUsage: script.ramUsage - })) - } - } + ramUsage: script.ramUsage, + })), + }, + }; }; (document as any).deleteFile = function (filename: string): IReturnWebStatus { @@ -58,8 +57,8 @@ function initWebserver(): void { if (home === null) { return { res: false, - msg: "Home server does not exist." - } + msg: "Home server does not exist.", + }; } return home.removeFile(filename); }; @@ -72,10 +71,10 @@ function initWebserver(): void { if (home === null) { return { res: false, - msg: "Home server does not exist." - } + msg: "Home server does not exist.", + }; } - const {success, overwritten} = home.writeToScriptFile(Player, filename, code); + const { success, overwritten } = home.writeToScriptFile(Player, filename, code); let script; if (success) { script = home.getScript(filename); @@ -84,9 +83,8 @@ function initWebserver(): void { res: success, data: { overwritten, - hash: script?.hash() || undefined, - ramUsage: script?.ramUsage - } + ramUsage: script?.ramUsage, + }, }; }; }