Skip to content

Commit

Permalink
πŸ› update link member when member is not mandatory and become member
Browse files Browse the repository at this point in the history
Co-authored-by: Joana Figueira <[email protected]>
  • Loading branch information
marta197 and JoanaFigueira committed Oct 15, 2024
1 parent 1da7a69 commit c8aec8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/containers/HolderChange/BecomeMember.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ function BecomeMember(props) {
setFieldValue('member', {
...values.member,
become_member: option,
link_member: isMemberMandatoryForHolderchange
// When become member is true, link member must be false.
// When member is not mandatory for holderchange, we set the link member to undefined
// because it is set in another page.
link_member: isMemberMandatoryForHolderchange || option === true
? !option
: values.member.link_member
: undefined
})
}

Expand Down

0 comments on commit c8aec8a

Please sign in to comment.