Merge pull request #8232 from overleaf/ab-fix-anonymous-users-assignment

Fix the condition to assign anonymous users to default for alpha/beta phases

GitOrigin-RevId: 4ffaf2cceeadbfc76120c874ee2c86f747034e9f
This commit is contained in:
Alexandre Bourdin
2022-06-01 08:03:22 +00:00
committed by Copybot
parent 78ca20b1e1
commit aaffbe3d10
@@ -207,9 +207,8 @@ async function _getAssignmentMetadata(analyticsId, user, splitTest) {
const currentVersion = splitTest.getCurrentVersion()
const phase = currentVersion.phase
if (
user &&
((phase === ALPHA_PHASE && !user.alphaProgram) ||
(phase === BETA_PHASE && !user.betaProgram))
(phase === ALPHA_PHASE && !user?.alphaProgram) ||
(phase === BETA_PHASE && !user?.betaProgram)
) {
return {
activeForUser: false,