diff --git a/CHANGELOG.md b/CHANGELOG.md index d34859071..4479c0a32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Fix a bug: unable to run scripts on systemts with legacy version of docker-compose - Fix a bug: unable to sign up if admin actived organization's additional fields with required +- Fix a bug: undefined error in new member page ## v5.4.1 2022 May 23 diff --git a/app/frontend/src/javascript/components/user/user-profile-form.tsx b/app/frontend/src/javascript/components/user/user-profile-form.tsx index 12d37384a..38d0178be 100644 --- a/app/frontend/src/javascript/components/user/user-profile-form.tsx +++ b/app/frontend/src/javascript/components/user/user-profile-form.tsx @@ -97,7 +97,7 @@ export const UserProfileForm: React.FC = ({ action, size, const fData = data.filter(f => f.actived); setProfileCustomFields(fData); const userProfileCustomFields = fData.map(f => { - const upcf = user.invoicing_profile_attributes.user_profile_custom_fields_attributes.find(uf => uf.profile_custom_field_id === f.id); + const upcf = user?.invoicing_profile_attributes?.user_profile_custom_fields_attributes?.find(uf => uf.profile_custom_field_id === f.id); return upcf || { value: '', invoicing_profile_id: user.invoicing_profile_attributes.id,