From f8f8b0837bad46e6b1f40ce6e8df3b45cf3c8542 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Mon, 31 Mar 2025 22:00:52 +1100 Subject: startup: wait for config to init Also cleanup some stuff --- src/config/funcs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/config/funcs.ts b/src/config/funcs.ts index 93a8ef5..72823eb 100644 --- a/src/config/funcs.ts +++ b/src/config/funcs.ts @@ -88,9 +88,9 @@ export const updateConfig = async () => { loadStyleAsync().catch(console.error); }; -export const initConfig = () => { +export const initConfig = async () => { monitorFile(CONFIG, () => updateConfig().catch(e => console.warn(`Invalid config: ${e}`))); - updateConfig().catch(e => console.warn(`Invalid config: ${e}`)); + await updateConfig().catch(e => console.warn(`Invalid config: ${e}`)); }; export const setConfig = async (path: string, value: any) => { -- cgit v1.2.3-freya