[AppSettings] Fix overwriting meantime edits after closing

This commit is contained in:
Ducko 2022-05-15 11:30:48 +01:00
parent c9c3b5ecff
commit 716dbce22b
1 changed files with 4 additions and 1 deletions

View File

@ -4,10 +4,13 @@ class Settings { // Heavily based on original for compat, but simplified and twe
constructor(path) {
try {
this.store = JSON.parse(fs.readFileSync(path));
} catch (e) {
} catch {
this.store = {};
}
this.path = path;
this.mod = this.getMod();
Object.assign(this, {
path,
mod: this.getMod()