Skip to content

Commit

Permalink
fix: filter out non-existing members in personal details
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictb committed Aug 7, 2024
1 parent f7e265a commit a6a2267
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
// Get the active chat members by filtering out the pending members with delete action
const activeChatMembers = participants.flatMap((accountID) => {
const pendingMember = report?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString());
const detail = personalDetails?.[accountID];
if (!detail) {
return [];
}
return !pendingMember || pendingMember.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? accountID : [];
});

Expand Down

0 comments on commit a6a2267

Please sign in to comment.