mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #18008 from overleaf/ab-fix-anon-assignment-append
[web] Fix anonymous assignment append to session GitOrigin-RevId: 402cd94ec6250e15f0e35cb69af3977c78ec5a7d
This commit is contained in:
parent
cdf4f98c87
commit
e4e054e8bb
1 changed files with 8 additions and 3 deletions
|
@ -84,8 +84,8 @@ async function appendAssignment(session, assignment) {
|
|||
|
||||
const assignments = await getAssignments(session)
|
||||
if (
|
||||
_.find(assignments[assignment.splitTestName], {
|
||||
splitTestName: assignment.splitTestName,
|
||||
!_.find(assignments[assignment.splitTestName], {
|
||||
variantName: assignment.variantName,
|
||||
versionNumber: assignment.versionNumber,
|
||||
})
|
||||
) {
|
||||
|
@ -97,7 +97,12 @@ async function appendAssignment(session, assignment) {
|
|||
// const assignmentString = _buildAssignmentString(splitTest, assignment)
|
||||
// const separator = session.sta.length > 0 ? ';' : ''
|
||||
// session.sta += `${separator}${assignmentString}`
|
||||
session.splitTests[assignment.splitTestName].push(assignment)
|
||||
session.splitTests[assignment.splitTestName].push({
|
||||
variantName: assignment.variantName,
|
||||
versionNumber: assignment.versionNumber,
|
||||
phase: assignment.phase,
|
||||
assignedAt: assignment.assignedAt,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue