fix(identity): fix exist user roles problem

#2721
pull/2761/head
mehmet-erim 5 years ago
parent 3e233001d4
commit 719f6486b7

@ -136,7 +136,7 @@ export class UsersComponent implements OnInit {
this.roles.map(role =>
this.fb.group({
[role.name]: [
this.selectedUserRoles.length
this.selected.id
? !!snq(() => this.selectedUserRoles.find(userRole => userRole.id === role.id))
: role.isDefault,
],
@ -181,7 +181,7 @@ export class UsersComponent implements OnInit {
)
.subscribe((state: Identity.State) => {
this.selected = state.selectedUser;
this.selectedUserRoles = state.selectedUserRoles;
this.selectedUserRoles = state.selectedUserRoles || [];
this.openModal();
});
}

Loading…
Cancel
Save