Skip to content

Commit a865bfd

Browse files
update
1 parent affee1a commit a865bfd

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/AzureAppConfigurationImpl.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,11 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
527527
keyValues.push([key, value]);
528528
}
529529

530-
await this.#resolveSecretReferences(this.#secretReferences, (key, value) => {
531-
keyValues.push([key, value]);
532-
});
530+
if (this.#secretReferences.length > 0) {
531+
await this.#resolveSecretReferences(this.#secretReferences, (key, value) => {
532+
keyValues.push([key, value]);
533+
});
534+
}
533535

534536
this.#clearLoadedKeyValues(); // clear existing key-values in case of configuration setting deletion
535537
for (const [k, v] of keyValues) {
@@ -771,10 +773,6 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
771773
}
772774

773775
async #resolveSecretReferences(secretReferences: ConfigurationSetting[], resultHandler: (key: string, value: unknown) => void): Promise<void> {
774-
if (secretReferences.length === 0) {
775-
return;
776-
}
777-
778776
if (this.#resolveSecretsInParallel) {
779777
const secretResolutionPromises: Promise<void>[] = [];
780778
for (const setting of secretReferences) {

0 commit comments

Comments
 (0)