Skip to content

Commit f3ac831

Browse files
add more comments
1 parent 01a7034 commit f3ac831

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/AzureAppConfigurationImpl.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,16 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
9797
this.#options = options;
9898
this.#clientManager = clientManager;
9999

100-
// Enable request tracing if not opt-out
100+
// enable request tracing if not opt-out
101101
this.#requestTracingEnabled = requestTracingEnabled();
102102

103103
if (options?.trimKeyPrefixes) {
104104
this.#sortedTrimKeyPrefixes = [...options.trimKeyPrefixes].sort((a, b) => b.localeCompare(a));
105105
}
106106

107+
// if no selector is specified, always load key values using the default selector: key="*" and label="\0"
108+
this.#kvSelectors = getValidKeyValueSelectors(options?.selectors);
109+
107110
if (options?.refreshOptions?.enabled) {
108111
const { refreshIntervalInMs, watchedSettings } = options.refreshOptions;
109112
if (watchedSettings === undefined || watchedSettings.length === 0) {
@@ -131,11 +134,9 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
131134
this.#kvRefreshTimer = new RefreshTimer(this.#kvRefreshInterval);
132135
}
133136

134-
this.#kvSelectors = getValidKeyValueSelectors(options?.selectors);
135-
136137
// feature flag options
137138
if (options?.featureFlagOptions?.enabled) {
138-
// validate feature flag selectors
139+
// validate feature flag selectors, only load feature flags when enabled
139140
this.#ffSelectors = getValidFeatureFlagSelectors(options.featureFlagOptions.selectors);
140141

141142
if (options.featureFlagOptions.refresh?.enabled) {

0 commit comments

Comments
 (0)