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

(cherry picked from commit 332d2c9)
  • Loading branch information
luacmartins authored and OSBotify committed Jun 20, 2023
1 parent 45274da commit 1608081
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 1608081

Please sign in to comment.