@@ -666,14 +666,17 @@ export class BucketClient {
666666 const features = this . _getFeatures ( options ) ;
667667 const feature = features [ key ] ;
668668
669- return this . _wrapRawFeature ( options , {
670- key,
671- isEnabled : feature ?. isEnabled ?? false ,
672- targetingVersion : feature ?. targetingVersion ,
673- config : feature ?. config ,
674- ruleEvaluationResults : feature ?. ruleEvaluationResults ,
675- missingContextFields : feature ?. missingContextFields ,
676- } ) ;
669+ return this . _wrapRawFeature (
670+ { ...options , enableChecks : true } ,
671+ {
672+ key,
673+ isEnabled : feature ?. isEnabled ?? false ,
674+ targetingVersion : feature ?. targetingVersion ,
675+ config : feature ?. config ,
676+ ruleEvaluationResults : feature ?. ruleEvaluationResults ,
677+ missingContextFields : feature ?. missingContextFields ,
678+ } ,
679+ ) ;
677680 }
678681
679682 /**
@@ -1199,7 +1202,11 @@ export class BucketClient {
11991202 }
12001203
12011204 private _wrapRawFeature < TKey extends keyof TypedFeatures > (
1202- { enableTracking, ...context } : { enableTracking : boolean } & Context ,
1205+ {
1206+ enableTracking,
1207+ enableChecks = false ,
1208+ ...context
1209+ } : { enableTracking : boolean ; enableChecks ?: boolean } & Context ,
12031210 { config, ...feature } : RawFeature ,
12041211 ) : TypedFeatures [ TKey ] {
12051212 // eslint-disable-next-line @typescript-eslint/no-this-alias
@@ -1211,7 +1218,7 @@ export class BucketClient {
12111218
12121219 return {
12131220 get isEnabled ( ) {
1214- if ( enableTracking ) {
1221+ if ( enableTracking && enableChecks ) {
12151222 void client
12161223 . sendFeatureEvent ( {
12171224 action : "check" ,
@@ -1232,7 +1239,7 @@ export class BucketClient {
12321239 return feature . isEnabled ;
12331240 } ,
12341241 get config ( ) {
1235- if ( enableTracking ) {
1242+ if ( enableTracking && enableChecks ) {
12361243 void client
12371244 . sendFeatureEvent ( {
12381245 action : "check-config" ,
0 commit comments