Yuki Takei пре 1 година
родитељ
комит
11c41fc8ce
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      apps/app/src/server/service/config-manager/config-manager.ts

+ 6 - 1
apps/app/src/server/service/config-manager/config-manager.ts

@@ -75,7 +75,12 @@ export class ConfigManager implements IConfigManager<ConfigKey, ConfigValues>, S
     if (!controlKey) {
       return false;
     }
-    return this.getConfig(controlKey) === true;
+
+    // Control keys should be read directly from envConfig to avoid recursion
+    if (!this.envConfig) {
+      throw new Error('Config is not loaded');
+    }
+    return this.envConfig[controlKey] === true;
   }
 
   async updateConfig<K extends ConfigKey>(key: K, value: ConfigValues[K], options?: UpdateConfigOptions): Promise<void> {