Skip to content

Commit

Permalink
fix: handle empty user roles response (#1215)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp committed Jun 28, 2023
1 parent be2a727 commit 2525c92
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 2525c92

Please sign in to comment.