use a Set when validating emails to prevent duplicates (#3090)

This commit is contained in:
Jake Fink 2022-07-13 09:20:46 -04:00 committed by GitHub
parent 5e84c630a8
commit 71b237a7eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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(