From 1608081df0ef7e64f1effcafd3e6ac0ed8bf2db2 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 19 Jun 2023 15:20:02 -0600 Subject: [PATCH] Merge pull request #21030 from Expensify/monil-fixMentionsCrash Fix Mentions crash (cherry picked from commit 332d2c96e1f0b4bbcdd85859868b6d7b3047d76a) --- src/pages/home/report/ReportActionCompose.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 344b14289c0d..35e33bb5170a 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -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; }