From 3090e5f6ebd797b2f561a55930138e26cec3fe20 Mon Sep 17 00:00:00 2001 From: Christos Date: Fri, 22 Nov 2024 12:02:24 +0200 Subject: [PATCH] fix control variant conditioning for term-savings --- .../experiments/use-longer-plan-term-default-experiment.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/my-sites/plans-features-main/hooks/experiments/use-longer-plan-term-default-experiment.ts b/client/my-sites/plans-features-main/hooks/experiments/use-longer-plan-term-default-experiment.ts index 3a5cd6855ef9cb..d27c23f5c48254 100644 --- a/client/my-sites/plans-features-main/hooks/experiments/use-longer-plan-term-default-experiment.ts +++ b/client/my-sites/plans-features-main/hooks/experiments/use-longer-plan-term-default-experiment.ts @@ -40,7 +40,9 @@ const useLongerPlanTermDefaultExperiment = (): { return { isLoadingExperiment: isLoadingExperimentAssignment, term: isLoadingExperimentAssignment ? undefined : term, - isEligibleForTermSavings: experimentAssignment?.variationName !== 'control', + isEligibleForTermSavings: !! ( + experimentAssignment?.variationName && experimentAssignment.variationName !== 'control' + ), }; };