Skip to content

Commit

Permalink
Merge pull request #21030 from Expensify/monil-fixMentionsCrash
Browse files Browse the repository at this point in the history
Fix Mentions crash
  • Loading branch information
luacmartins authored Jun 19, 2023
2 parents 9559a54 + 1af376d commit 332d2c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@ class ReportActionCompose extends React.Component {
}

const filteredPersonalDetails = _.filter(_.values(personalDetails), (detail) => {
// If we don't have user's primary login, that member is not known to the current user and hence we do not allow them to be mentioned
if (!detail.login) {
return false;
}
if (searchValue && !`${detail.displayName} ${detail.login}`.toLowerCase().includes(searchValue.toLowerCase())) {
return false;
}
Expand Down

0 comments on commit 332d2c9

Please sign in to comment.