Skip to content

Commit

Permalink
fix: null checks for title
Browse files Browse the repository at this point in the history
  • Loading branch information
nexarvo committed Jun 12, 2024
1 parent 9d4a66f commit 38d7f5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/ReportAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function ReportAvatar({report = {} as Report, policies, isLoadingApp = true, rou
fileName = groupChatDraft?.originalFileName ?? undefined;
// When user enters custom group name, it typically stored in groupChatDraft.reportName
// If that is null then we will use ReportUtils.getGroupChatName to get the name
title = groupChatDraft?.reportName ?? ReportUtils.getGroupChatName(groupChatDraft?.participants.map((participant) => participant.accountID) ?? []);
title = groupChatDraft?.reportName || ReportUtils.getGroupChatName(groupChatDraft?.participants.map((participant) => participant.accountID) ?? [], true);
shouldShowNotFoundPage = !isLoadingApp && !groupChatDraft;
} else {
avatarURL = policy ? ReportUtils.getWorkspaceAvatar(report) : report?.avatarUrl;
Expand Down

0 comments on commit 38d7f5b

Please sign in to comment.