mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
fix code not saving
This commit is contained in:
parent
a6642a1962
commit
d7c23b975c
@ -259,12 +259,14 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
function updateCode(newCode?: string): void {
|
function updateCode(newCode?: string): void {
|
||||||
if (newCode === undefined) return;
|
if (newCode === undefined) return;
|
||||||
lastCode = newCode;
|
lastCode = newCode;
|
||||||
|
setCode(newCode);
|
||||||
|
updateRAM(newCode);
|
||||||
|
try {
|
||||||
if (editorRef.current !== null) {
|
if (editorRef.current !== null) {
|
||||||
lastPosition = editorRef.current.getPosition();
|
lastPosition = editorRef.current.getPosition();
|
||||||
infLoop(newCode);
|
infLoop(newCode);
|
||||||
}
|
}
|
||||||
setCode(newCode);
|
} catch (err) {}
|
||||||
updateRAM(newCode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate it once the first time the file is loaded.
|
// calculate it once the first time the file is loaded.
|
||||||
|
@ -289,6 +289,5 @@ export const Settings: ISettings & ISelfInitializer & ISelfLoading = {
|
|||||||
Object.assign(Settings.theme, save.theme);
|
Object.assign(Settings.theme, save.theme);
|
||||||
delete save.theme;
|
delete save.theme;
|
||||||
Object.assign(Settings, save);
|
Object.assign(Settings, save);
|
||||||
console.log(Settings);
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user