fix: fix configuration callback property type
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 26 Jul 2023 22:13:49 +0000 (00:13 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 26 Jul 2023 22:13:49 +0000 (00:13 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/utils/Configuration.ts

index f03e0472570ec0af65a1a0dd070d57a8131fd911..2491757bea399797bfc7881b2f07ccaa19d94039 100644 (file)
@@ -47,7 +47,7 @@ export class Configuration {
     [ConfigurationSection.uiServer, Configuration.buildUIServerSection()],
   ]);
 
-  private static configurationChangeCallback: () => Promise<void>;
+  private static configurationChangeCallback?: () => Promise<void>;
 
   private constructor() {
     // This is intentional
@@ -509,7 +509,7 @@ export class Configuration {
           delete Configuration.configurationData;
           Configuration.configurationSectionCache.clear();
           if (!isUndefined(Configuration.configurationChangeCallback)) {
-            Configuration.configurationChangeCallback().catch((error) => {
+            Configuration.configurationChangeCallback!().catch((error) => {
               throw typeof error === 'string' ? new Error(error) : error;
             });
           }