@@ -66,8 +66,6 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
6666 #isInitialLoadCompleted: boolean = false ;
6767 #isFailoverRequest: boolean = false ;
6868 #featureFlagTracing: FeatureFlagTracingOptions | undefined ;
69-
70- #isPackageInspected: boolean = false ;
7169 #fmVersion: string | undefined ;
7270
7371 // Refresh
@@ -231,7 +229,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
231229 * Loads the configuration store for the first time.
232230 */
233231 async load ( ) {
234- await this . #ensurePackageInspected ( ) ;
232+ await this . #inspectFmPackage ( ) ;
235233 await this . #loadSelectedAndWatchedKeyValues( ) ;
236234 if ( this . #featureFlagEnabled) {
237235 await this . #loadFeatureFlags( ) ;
@@ -287,7 +285,6 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
287285 * Refreshes the configuration.
288286 */
289287 async refresh ( ) : Promise < void > {
290- await this . #ensurePackageInspected( ) ;
291288 if ( ! this . #refreshEnabled && ! this . #featureFlagRefreshEnabled) {
292289 throw new Error ( "Refresh is not enabled for key-values or feature flags." ) ;
293290 }
@@ -323,9 +320,11 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
323320 return new Disposable ( remove ) ;
324321 }
325322
326- async #ensurePackageInspected( ) {
327- if ( ! this . #isPackageInspected) {
328- this . #isPackageInspected = true ;
323+ /**
324+ * Inspects the feature management package version.
325+ */
326+ async #inspectFmPackage( ) {
327+ if ( this . #requestTracingEnabled && ! this . #fmVersion) {
329328 try {
330329 // get feature management package version
331330 const fmPackage = await import ( FM_PACKAGE_NAME ) ;
0 commit comments