Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pages/NewChatPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ function NewChatPage({betas, isGroupChat, personalDetails, reports, translate})
const headerMessage = OptionsListUtils.getHeaderMessage(
filteredPersonalDetails.length + filteredRecentReports.length !== 0,
Boolean(filteredUserToInvite),
searchTerm,
searchTerm.trim(),
maxParticipantsReached,
_.some(selectedOptions, (participant) => participant.searchText.toLowerCase().includes(searchTerm.trim().toLowerCase())),
);
const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ function MoneyRequestParticipantsSelector({
const headerMessage = OptionsListUtils.getHeaderMessage(
newChatOptions.personalDetails.length + newChatOptions.recentReports.length !== 0,
Boolean(newChatOptions.userToInvite),
searchTerm,
searchTerm.trim(),
Comment thread
namhihi237 marked this conversation as resolved.
maxParticipantsReached,
_.some(participants, (participant) => participant.login.toLowerCase().includes(searchTerm.trim().toLowerCase())),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this caused a regression the login field is only available on user accounts but not on workspaces, this lead to a crash #27864

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think should check login first:

_.some(participants, (participant) => participant.login && participant.login.toLowerCase().includes(searchTerm.trim().toLowerCase())),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also cover the workspace case
Screenshot 2023-09-20 at 3 45 02 PM

);
const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails);

Expand Down