[AppSettings] Fix overwriting meantime edits after closing
This commit is contained in:
parent
c9c3b5ecff
commit
716dbce22b
1 changed files with 4 additions and 1 deletions
|
@ -4,10 +4,13 @@ class Settings { // Heavily based on original for compat, but simplified and twe
|
||||||
constructor(path) {
|
constructor(path) {
|
||||||
try {
|
try {
|
||||||
this.store = JSON.parse(fs.readFileSync(path));
|
this.store = JSON.parse(fs.readFileSync(path));
|
||||||
} catch (e) {
|
} catch {
|
||||||
this.store = {};
|
this.store = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.path = path;
|
||||||
|
this.mod = this.getMod();
|
||||||
|
|
||||||
Object.assign(this, {
|
Object.assign(this, {
|
||||||
path,
|
path,
|
||||||
mod: this.getMod()
|
mod: this.getMod()
|
||||||
|
|
Loading…
Reference in a new issue