Skip to content

Commit

Permalink
fix: condition to detect if informant type changed or not
Browse files Browse the repository at this point in the history
  • Loading branch information
tahmidrahman-dsi committed Oct 7, 2024
1 parent f1993a4 commit b413289
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/client/src/views/RegisterForm/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,8 @@ class RegisterFormView extends React.Component<FullProps, State> {
const { declaration } = this.props
const informantTypeChanged =
prevProps.declaration?.data?.informant?.informantType !==
declaration?.data?.informant?.informantType
declaration?.data?.informant?.informantType &&
Boolean(declaration?.data?.informant?.informantType)

// see https://github.com/opencrvs/opencrvs-core/issues/5820
if (informantTypeChanged) {
Expand Down

0 comments on commit b413289

Please sign in to comment.