@@ -1004,38 +1004,38 @@ export class DecisionService {
10041004 }
10051005 } ) : this . getVariationForFeatureExperiment ( op , configObj , feature , user , decideOptions , userProfileTracker ) ;
10061006
1007- return experimentDecision . then ( ( experimentDecision ) => {
1008- if ( experimentDecision . error || experimentDecision . result . variation !== null ) {
1009- return Value . of ( op , {
1010- ...experimentDecision ,
1011- reasons : [ ...decideReasons , ...experimentDecision . reasons ] ,
1012- } ) ;
1013- }
1007+ return experimentDecision . then ( ( experimentDecision ) => {
1008+ if ( experimentDecision . error || experimentDecision . result . variation !== null ) {
1009+ return Value . of ( op , {
1010+ ...experimentDecision ,
1011+ reasons : [ ...decideReasons , ...experimentDecision . reasons ] ,
1012+ } ) ;
1013+ }
10141014
1015- decideReasons . push ( ...experimentDecision . reasons ) ;
1015+ decideReasons . push ( ...experimentDecision . reasons ) ;
10161016
1017- const rolloutDecision = this . getVariationForRollout ( configObj , feature , user ) ;
1018- decideReasons . push ( ...rolloutDecision . reasons ) ;
1019- const rolloutDecisionResult = rolloutDecision . result ;
1020- const userId = user . getUserId ( ) ;
1017+ const rolloutDecision = this . getVariationForRollout ( configObj , feature , user ) ;
1018+ decideReasons . push ( ...rolloutDecision . reasons ) ;
1019+ const rolloutDecisionResult = rolloutDecision . result ;
1020+ const userId = user . getUserId ( ) ;
10211021
1022- if ( rolloutDecisionResult . variation ) {
1023- this . logger ?. debug ( USER_IN_ROLLOUT , userId , feature . key ) ;
1024- decideReasons . push ( [ USER_IN_ROLLOUT , userId , feature . key ] ) ;
1025- } else {
1026- this . logger ?. debug ( USER_NOT_IN_ROLLOUT , userId , feature . key ) ;
1027- decideReasons . push ( [ USER_NOT_IN_ROLLOUT , userId , feature . key ] ) ;
1028- }
1022+ if ( rolloutDecisionResult . variation ) {
1023+ this . logger ?. debug ( USER_IN_ROLLOUT , userId , feature . key ) ;
1024+ decideReasons . push ( [ USER_IN_ROLLOUT , userId , feature . key ] ) ;
1025+ } else {
1026+ this . logger ?. debug ( USER_NOT_IN_ROLLOUT , userId , feature . key ) ;
1027+ decideReasons . push ( [ USER_NOT_IN_ROLLOUT , userId , feature . key ] ) ;
1028+ }
10291029
1030- if ( appliedHoldout ) {
1031- rolloutDecisionResult . holdout = appliedHoldout ;
1032- }
1030+ if ( appliedHoldout ) {
1031+ rolloutDecisionResult . holdout = appliedHoldout ;
1032+ }
10331033
1034- return Value . of ( op , {
1035- result : rolloutDecisionResult ,
1036- reasons : decideReasons ,
1037- } ) ;
1034+ return Value . of ( op , {
1035+ result : rolloutDecisionResult ,
1036+ reasons : decideReasons ,
10381037 } ) ;
1038+ } ) ;
10391039 }
10401040
10411041 /**
0 commit comments