Skip to content

Commit

Permalink
Merge pull request #64 from openimis/release/23.10
Browse files Browse the repository at this point in the history
MERGING RELEASE branches
  • Loading branch information
hirensoni913 authored Nov 13, 2023
2 parents 866d264 + 6e2fc51 commit b26a5bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/ContractForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ class ContractForm extends Component {
this.setState((state, props) => ({
contract: {
...state.contract,
policyHolder: props.policyHolders.find((v) => decodeId(v.id) === props.predefinedPolicyHolderId)
policyHolder: props.predefinedPolicyHolderId
? props.policyHolders.find((v) => decodeId(v.id) === props.predefinedPolicyHolderId)
: ( props.contract.policyHolder
? props.policyHolders.find((v) => decodeId(v.id) === decodeId(props.contract.policyHolder.id))
: null
)
}
}));
}
Expand Down

0 comments on commit b26a5bc

Please sign in to comment.