From 793c88e60c02956415831c06b99843a92fe3eaca Mon Sep 17 00:00:00 2001 From: dominictb Date: Sat, 13 Jul 2024 15:56:19 +0700 Subject: [PATCH] fix: check empty array for report participants in migration function Signed-off-by: dominictb --- src/libs/migrations/Participants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/migrations/Participants.ts b/src/libs/migrations/Participants.ts index eccaa0662f2f..74a909379771 100644 --- a/src/libs/migrations/Participants.ts +++ b/src/libs/migrations/Participants.ts @@ -36,8 +36,8 @@ export default function (): Promise { } const collection = Object.entries(reports).reduce((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 = {}; const deprecatedParticipants = new Set(report.participantAccountIDs);