Skip to content

Commit

Permalink
Merge pull request #46943 from dominictb/fix/46670-member-count
Browse files Browse the repository at this point in the history
fix: filter out non-existing members in personal details
  • Loading branch information
Gonals authored Aug 19, 2024
2 parents 8f93df1 + a6a2267 commit 20c451e
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 20c451e

Please sign in to comment.