Solved an oopsie

This commit is contained in:
Tiago Ribeiro
2023-10-09 22:38:09 +01:00
parent cb3790dc1d
commit 0c9a49a9c3
3 changed files with 20 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ const CreatePanel = ({user, users, group, onCreate}: CreateDialogProps) => {
return;
}
const emailUsers = emails.map((x) => users.find((y) => y.email.toLowerCase() === x)).filter((x) => x !== undefined);
const emailUsers = [...new Set(emails)].map((x) => users.find((y) => y.email.toLowerCase() === x)).filter((x) => x !== undefined);
const filteredUsers = emailUsers.filter(
(x) =>
((user.type === "developer" || user.type === "owner" || user.type === "admin") &&