Skip to content

Commit

Permalink
fix: handle empty user roles response (#1245)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp authored Sep 14, 2023
1 parent 017a876 commit 2e18f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/UserForm/RolesSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const RolesSection = React.memo(
rightHeader={i18n.t('User roles this user is assigned')}
options={userRoleOptions}
initialValue={
user?.userCredentials.userRoles.map(({ id }) => id) || []
user?.userCredentials?.userRoles?.map(({ id }) => id) || []
}
validate={hasSelectionValidator}
/>
Expand Down

0 comments on commit 2e18f8b

Please sign in to comment.