QFix for duplicate undefined in list (#6068)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-07-16 12:07:27 +07:00 committed by GitHub
parent 8601d7c382
commit 6d2f17b2cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -481,7 +481,12 @@ export function groupByPersonAccountCategories (categories: any[]): AggregateVal
.map((it) => new AggregateValueData(it.person, it._id, it.space))
fst = new AggregateValue(personAccount.person, people)
personMap.set(personAccount.person, fst)
existingCategories.push(fst)
if (fst.name === undefined) {
existingCategories[0] = new AggregateValue(undefined, [...existingCategories[0].values, ...fst.values])
// Join with first value
} else {
existingCategories.push(fst)
}
}
}
}