Skip to content

Commit

Permalink
fixed by Fedi suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Luckyman0305 committed Aug 8, 2023
1 parent 9783b2c commit 1b3c2b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,9 +1031,10 @@ function getHeaderMessage(hasSelectableOptions, hasUserToInvite, searchValue, ma
if (/@/.test(searchValue) && !isValidEmail) {
return Localize.translate(preferredLocale, 'messages.errorMessageInvalidEmail');
}
if (!hasMatchedParticipant){
return Localize.translate(preferredLocale, 'common.noResultsFound');
if (hasMatchedParticipant && (isValidEmail || isValidPhone)){
return '';
}
return Localize.translate(preferredLocale, 'common.noResultsFound');
}

return '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function MoneyRequestParticipantsSplitSelector({betas, participants, personalDet
Boolean(newChatOptions.userToInvite),
searchTerm,
maxParticipantsReached,
participants.filter(participant => participant.searchText.toLowerCase().includes(searchTerm.toLowerCase())).length > 0
participants.some(participant => participant.searchText.toLowerCase().includes(searchTerm.toLowerCase()))
);
const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails);

Expand Down

0 comments on commit 1b3c2b5

Please sign in to comment.