diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index bd934777bcb..336c4b40bf1 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -606,6 +606,7 @@ export class ConfigHandler { } async loadConfig(): Promise> { + await this.isInitialized; if (!this.currentProfile) { return { config: undefined, @@ -613,7 +614,6 @@ export class ConfigHandler { configLoadInterrupted: true, }; } - await this.isInitialized; const config = await this.currentProfile.loadConfig( this.additionalContextProviders, ); diff --git a/gui/src/hooks/ParallelListeners.tsx b/gui/src/hooks/ParallelListeners.tsx index e8cb96a95b1..2d50c702e25 100644 --- a/gui/src/hooks/ParallelListeners.tsx +++ b/gui/src/hooks/ParallelListeners.tsx @@ -64,7 +64,7 @@ function ParallelListeners() { if (isInitial && hasDoneInitialConfigLoad.current) { return; } - if (configResult.configLoadInterrupted) { + if (configResult.configLoadInterrupted || !configResult.config) { return; } hasDoneInitialConfigLoad.current = true;