From 716dbce22b7e199d5ddd11a2291223bff3cea909 Mon Sep 17 00:00:00 2001 From: Oj Date: Sun, 15 May 2022 11:30:48 +0100 Subject: [PATCH] [AppSettings] Fix overwriting meantime edits after closing --- src/appSettings.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/appSettings.js b/src/appSettings.js index 1579295..94c3cdc 100644 --- a/src/appSettings.js +++ b/src/appSettings.js @@ -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()