summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config/funcs.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config/funcs.ts b/src/config/funcs.ts
index fbfb88e..77ee8dd 100644
--- a/src/config/funcs.ts
+++ b/src/config/funcs.ts
@@ -100,7 +100,9 @@ const updateSection = (from: { [k: string]: any }, to: { [k: string]: any }, pat
};
export const updateConfig = async () => {
- updateSection(deepMerge(defaults, JSON.parse(await readFileAsync(CONFIG))), config);
+ if (GLib.file_test(CONFIG, GLib.FileTest.EXISTS))
+ updateSection(deepMerge(defaults, JSON.parse(await readFileAsync(CONFIG))), config);
+ else updateSection(defaults, config);
await loadStyleAsync();
console.log("[LOG] Config updated");
};