[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) {
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue