From 71b237a7ebfa2cdcc4cb5c62977771a16b9e3213 Mon Sep 17 00:00:00 2001 From: Jake Fink Date: Wed, 13 Jul 2022 09:20:46 -0400 Subject: [PATCH] use a Set when validating emails to prevent duplicates (#3090) --- .../web/src/app/organizations/manage/user-add-edit.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/app/organizations/manage/user-add-edit.component.ts b/apps/web/src/app/organizations/manage/user-add-edit.component.ts index 7d4626384b..ce597db7b5 100644 --- a/apps/web/src/app/organizations/manage/user-add-edit.component.ts +++ b/apps/web/src/app/organizations/manage/user-add-edit.component.ts @@ -187,7 +187,7 @@ export class UserAddEditComponent implements OnInit { ); } else { const request = new OrganizationUserInviteRequest(); - request.emails = this.emails.trim().split(/\s*,\s*/); + request.emails = [...new Set(this.emails.trim().split(/\s*,\s*/))]; request.accessAll = this.access === "all"; request.type = this.type; request.permissions = this.setRequestPermissions(