From b413289aab62035fd9e0909384e9d2f746c65c94 Mon Sep 17 00:00:00 2001 From: tahmidrahman-dsi Date: Mon, 7 Oct 2024 17:20:19 +0600 Subject: [PATCH] fix: condition to detect if informant type changed or not --- packages/client/src/views/RegisterForm/RegisterForm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/views/RegisterForm/RegisterForm.tsx b/packages/client/src/views/RegisterForm/RegisterForm.tsx index 9adcb5957f..16164f06f8 100644 --- a/packages/client/src/views/RegisterForm/RegisterForm.tsx +++ b/packages/client/src/views/RegisterForm/RegisterForm.tsx @@ -705,7 +705,8 @@ class RegisterFormView extends React.Component { 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) {