@@ -30,7 +30,7 @@ import {
30
30
} from '../constants' ;
31
31
import { decodeFlag } from '../decoding' ;
32
32
import { EppoValue } from '../eppo_value' ;
33
- import { Evaluator , FlagEvaluation , noneResult } from '../evaluator' ;
33
+ import { Evaluator , FlagEvaluation , noneResult , overrideResult } from '../evaluator' ;
34
34
import { BoundedEventQueue } from '../events/bounded-event-queue' ;
35
35
import EventDispatcher from '../events/event-dispatcher' ;
36
36
import NoOpEventDispatcher from '../events/no-op-event-dispatcher' ;
@@ -948,28 +948,13 @@ export default class EppoClient {
948
948
const flagEvaluationDetailsBuilder = this . newFlagEvaluationDetailsBuilder ( flagKey ) ;
949
949
const overrideVariation = this . overridesStore ?. get ( flagKey ) ;
950
950
if ( overrideVariation ) {
951
- const overrideAllocationKey = 'override-' + overrideVariation . key ;
952
- const flagEvaluationDetails = flagEvaluationDetailsBuilder
953
- . setMatch (
954
- 0 ,
955
- overrideVariation ,
956
- { key : overrideAllocationKey , splits : [ ] , doLog : false } ,
957
- null ,
958
- undefined ,
959
- )
960
- . build ( 'MATCH' , 'Flag override applied' ) ;
961
-
962
- return {
951
+ return overrideResult (
963
952
flagKey ,
964
953
subjectKey ,
965
- variation : overrideVariation ,
966
954
subjectAttributes ,
967
- flagEvaluationDetails,
968
- doLog : false ,
969
- format : '' ,
970
- allocationKey : 'override' ,
971
- extraLogging : { } ,
972
- } ;
955
+ overrideVariation ,
956
+ flagEvaluationDetailsBuilder ,
957
+ ) ;
973
958
}
974
959
975
960
const configDetails = this . getConfigDetails ( ) ;
0 commit comments