File tree 1 file changed +3
-3
lines changed
src/events/components/experiments
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ if (typeof window !== 'undefined') {
83
83
export function getExperimentControlGroupFromSession (
84
84
experimentKey : ExperimentNames ,
85
85
percentToGetExperiment = 50 ,
86
- ) {
86
+ ) : string {
87
87
if ( controlGroupOverride [ experimentKey ] ) {
88
88
return controlGroupOverride [ experimentKey ]
89
89
} else if ( process . env . NODE_ENV === 'development' ) {
@@ -99,7 +99,7 @@ export function getExperimentControlGroupFromSession(
99
99
return modHash < percentToGetExperiment ? TREATMENT_VARIATION : CONTROL_VARIATION
100
100
}
101
101
102
- export function getExperimentVariationForContext ( locale : string ) {
102
+ export function getExperimentVariationForContext ( locale : string ) : string {
103
103
const experiments = getActiveExperiments ( locale )
104
104
for ( const experiment of experiments ) {
105
105
if ( experiment . includeVariationInContext ) {
@@ -111,7 +111,7 @@ export function getExperimentVariationForContext(locale: string) {
111
111
}
112
112
113
113
// When no experiment has `includeVariationInContext: true`
114
- return null
114
+ return ''
115
115
}
116
116
117
117
export function initializeExperiments ( locale : string ) {
You can’t perform that action at this time.
0 commit comments