mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13: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;
|
||||||
if (editorRef.current !== null) {
|
|
||||||
lastPosition = editorRef.current.getPosition();
|
|
||||||
infLoop(newCode);
|
|
||||||
}
|
|
||||||
setCode(newCode);
|
setCode(newCode);
|
||||||
updateRAM(newCode);
|
updateRAM(newCode);
|
||||||
|
try {
|
||||||
|
if (editorRef.current !== null) {
|
||||||
|
lastPosition = editorRef.current.getPosition();
|
||||||
|
infLoop(newCode);
|
||||||
|
}
|
||||||
|
} catch (err) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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