From 9140c1ea81f06f9e0756d4226b9d6bb87e3858c5 Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Thu, 6 Feb 2025 16:47:48 -0600 Subject: [PATCH] Refactor reloadConfig method to use class property for additional context providers --- core/config/ConfigHandler.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/config/ConfigHandler.ts b/core/config/ConfigHandler.ts index 4ad045d30..4638613b9 100644 --- a/core/config/ConfigHandler.ts +++ b/core/config/ConfigHandler.ts @@ -365,11 +365,11 @@ export class ConfigHandler { this.updateListeners.push(listener); } - async reloadConfig(additionalContextProviders: IContextProvider[] = []) { + async reloadConfig() { // TODO: this isn't right, there are two different senses in which you want to "reload" const { config, errors, configLoadInterrupted } = - await this.currentProfile.reloadConfig(additionalContextProviders); + await this.currentProfile.reloadConfig(this.additionalContextProviders); if (config) { this.inactiveProfiles.forEach((profile) => profile.clearConfig()); @@ -419,6 +419,6 @@ export class ConfigHandler { registerCustomContextProvider(contextProvider: IContextProvider) { this.additionalContextProviders.push(contextProvider); - void this.reloadConfig(this.additionalContextProviders); + void this.reloadConfig(); } }