[AAE-1562] Fix should not be able to search already selected user (#5414)

This commit is contained in:
arditdomi
2020-01-28 17:54:01 +00:00
committed by Maurizio Vitale
parent 0ae55ba590
commit 80f805801f

View File

@@ -259,7 +259,7 @@ export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy {
}
private isUserAlreadySelected(user: IdentityUserModel): boolean {
if (this.selectedUsers && this.selectedUsers.length > 0 && this.isMultipleMode()) {
if (this.selectedUsers && this.selectedUsers.length > 0) {
const result = this.selectedUsers.find((selectedUser) => {
return selectedUser.id === user.id || selectedUser.email === user.email || selectedUser.username === user.username;
});