diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-31 22:00:52 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-31 22:00:52 +1100 |
| commit | f8f8b0837bad46e6b1f40ce6e8df3b45cf3c8542 (patch) | |
| tree | 1e36ba9a357434fed7ff9eecda5b9f69b6ae0e77 /src/config | |
| parent | config: don't show sidebar on startup by default (diff) | |
| download | caelestia-shell-f8f8b0837bad46e6b1f40ce6e8df3b45cf3c8542.tar.gz caelestia-shell-f8f8b0837bad46e6b1f40ce6e8df3b45cf3c8542.tar.bz2 caelestia-shell-f8f8b0837bad46e6b1f40ce6e8df3b45cf3c8542.zip | |
startup: wait for config to init
Also cleanup some stuff
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/funcs.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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) => { |