From dfae923437ea3fd0944d322421c8ff45ad081870 Mon Sep 17 00:00:00 2001 From: Jules Date: Tue, 4 Jul 2023 12:08:28 +0100 Subject: [PATCH] Merge pull request #22132 from Expensify/andrewli-workspaceinvitefix Fix invited user disappearing when searching for another user (cherry picked from commit 9630ba612532ea5e36aded61cc43e7fde94a63a6) --- src/pages/workspace/WorkspaceInvitePage.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 1092579f0bc5..5162c07b1343 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -179,10 +179,7 @@ class WorkspaceInvitePage extends React.Component { _.forEach(personalDetails, (detail) => (detailsMap[detail.login] = detail)); const selectedOptions = []; _.forEach(this.state.selectedOptions, (option) => { - if (!_.has(detailsMap, option.login)) { - return; - } - selectedOptions.push(detailsMap[option.login]); + selectedOptions.push(_.has(detailsMap, option.login) ? detailsMap[option.login] : option); }); this.setState({