File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -67,15 +67,18 @@ export class FeatureFlagClient {
67
67
}
68
68
69
69
public static checkExperimentValue ( experiment : string ) : any {
70
- let gateValue : any = undefined ;
70
+ let gateValue : any ;
71
+ const experimentGate = ExperimentGates [ experiment ] ;
71
72
if ( FeatureGates === null ) {
72
- console . warn ( 'FeatureGates: FeatureGates is not initialized. Defaulting to Undefined' ) ;
73
+ console . warn (
74
+ `FeatureGates: FeatureGates is not initialized. Returning default value: ${ experimentGate . defaultValue } ` ,
75
+ ) ;
73
76
} else {
74
77
console . log ( ExperimentGates [ experiment ] ) ;
75
78
gateValue = FeatureGates . getExperimentValue (
76
- ExperimentGates [ experiment ] . gate ,
77
- ExperimentGates [ experiment ] . parameter ,
78
- ExperimentGates [ experiment ] . defaultValue ,
79
+ experimentGate . gate ,
80
+ experimentGate . parameter ,
81
+ experimentGate . defaultValue ,
79
82
) ;
80
83
}
81
84
console . log ( `ExperimentGateValue: ${ experiment } -> ${ gateValue } ` ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export const ExperimentGates: ExperimentGate = {
17
17
[ Experiments . NewAuthUIAA ] : {
18
18
gate : 'atlascode_new_auth_ui_aa' ,
19
19
parameter : 'isEnabled' ,
20
- defaultValue : `bruh` ,
20
+ defaultValue : false ,
21
21
} ,
22
22
} ;
23
23
You can’t perform that action at this time.
0 commit comments