1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-19 08:52:25 +01:00

Fix a bug: undefined error in new member page

This commit is contained in:
Du Peng 2022-05-27 12:02:02 +02:00
parent 8d724d7191
commit 384dd43029
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -97,7 +97,7 @@ export const UserProfileForm: React.FC<UserProfileFormProps> = ({ 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,