Skip to content

Commit f367161

Browse files
update
1 parent 3005407 commit f367161

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/load.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,16 @@ export async function loadFromAzureFrontDoor(
7676
endpoint: string | URL,
7777
appConfigOptions?: AzureAppConfigurationOptions
7878
): Promise<AzureAppConfiguration> {
79-
if (appConfigOptions === undefined) {
80-
appConfigOptions = {
81-
replicaDiscoveryEnabled: false // replica discovery will be enabled by default, disable it for CDN manually
82-
};
79+
if (!appConfigOptions) {
80+
appConfigOptions = {};
8381
}
8482
if (appConfigOptions.replicaDiscoveryEnabled) {
8583
throw new ArgumentError("Replica discovery is not supported when loading from Azure Front Door.");
8684
}
8785
if (appConfigOptions.loadBalancingEnabled) {
8886
throw new ArgumentError("Load balancing is not supported when loading from Azure Front Door.");
8987
}
88+
appConfigOptions.replicaDiscoveryEnabled = false; // Disable replica discovery when loading from Azure Front Door
9089

9190
appConfigOptions.clientOptions = {
9291
...appConfigOptions.clientOptions,

0 commit comments

Comments
 (0)