Skip to content

Commit

Permalink
fix: check empty array for report participants
Browse files Browse the repository at this point in the history
in migration function

Signed-off-by: dominictb <[email protected]>
  • Loading branch information
dominictb committed Jul 13, 2024
1 parent 7255ab5 commit 793c88e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/migrations/Participants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default function (): Promise<void> {
}

const collection = Object.entries(reports).reduce<OldReportCollection>((reportsCollection, [onyxKey, report]) => {
// If we have participantAccountIDs then this report is eligible for migration
if (report?.participantAccountIDs) {
// If we have non-empty participantAccountIDs then this report is eligible for migration
if (report?.participantAccountIDs?.length) {
const participants: NullishDeep<Participants> = {};

const deprecatedParticipants = new Set(report.participantAccountIDs);
Expand Down

0 comments on commit 793c88e

Please sign in to comment.