1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-26 12:25:20 +01:00

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

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(