use diff instead of xor (#487)

fixing: #461
This commit is contained in:
Erik Jan de Wit 2021-03-31 21:45:20 +02:00 committed by GitHub
parent f1a658da01
commit 579719c3bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ export const MemberModal = ({ groupId, onClose }: MemberModalProps) => {
try {
const users = await adminClient.users.find({ ...params });
return _.xorBy(users, members, "id").slice(0, max);
return _.differenceBy(users, members, "id").slice(0, max);
} catch (error) {
addAlert(t("noUsersFoundError", { error }), AlertVariant.danger);
return [];