From 8166fe3905968f6c9082f6473de951606c247615 Mon Sep 17 00:00:00 2001 From: Samuel Herodotou Date: Wed, 11 Oct 2023 23:56:07 +0100 Subject: [PATCH] Cleaner dictionary handling --- src/pages/workspace/WorkspaceInvitePage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 2c75728e1267..2a696d7548eb 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -124,9 +124,9 @@ function WorkspaceInvitePage(props) { }); // Strip out dictionary keys and update arrays - setUsersToInvite(_.map(newUsersToInviteDict, (v) => v)); - setPersonalDetails(_.map(newPersonalDetailsDict, (v) => v)); - setSelectedOptions(_.map(newSelectedOptionsDict, (v) => v)); + setUsersToInvite(_.values(newUsersToInviteDict)); + setPersonalDetails(_.values(newPersonalDetailsDict)); + setSelectedOptions(_.values(newSelectedOptionsDict)); // eslint-disable-next-line react-hooks/exhaustive-deps -- we don't want to recalculate when selectedOptions change }, [props.personalDetails, props.policyMembers, props.betas, searchTerm, excludedUsers]);