From 62a0f7aa79e7943d0507dde9031699a6b3d32bc9 Mon Sep 17 00:00:00 2001 From: Likhith Kolayari Date: Wed, 10 May 2023 18:43:18 +0400 Subject: [PATCH] feat: :bug: minor code smells --- packages/account/src/Components/forms/idv-form.tsx | 2 +- .../poi-confirm-with-example-form-container.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/account/src/Components/forms/idv-form.tsx b/packages/account/src/Components/forms/idv-form.tsx index 50ee168ac8d6..683e1dffbc3a 100644 --- a/packages/account/src/Components/forms/idv-form.tsx +++ b/packages/account/src/Components/forms/idv-form.tsx @@ -111,7 +111,7 @@ const IDVForm = ({ document_name === 'document_number' ? values.document_type : values.document_type.additional; let current_input: string | null = null; current_input = example_format.includes('-') - ? formatInput(example_format, current_input || e.target.value, '-') + ? formatInput(example_format, current_input ?? e.target.value, '-') : e.target.value; setFieldValue(document_name, current_input, true); }; diff --git a/packages/account/src/Components/poi/poi-confirm-with-example-form-container/poi-confirm-with-example-form-container.tsx b/packages/account/src/Components/poi/poi-confirm-with-example-form-container/poi-confirm-with-example-form-container.tsx index 7fef2b1dc209..63949898186a 100644 --- a/packages/account/src/Components/poi/poi-confirm-with-example-form-container/poi-confirm-with-example-form-container.tsx +++ b/packages/account/src/Components/poi/poi-confirm-with-example-form-container/poi-confirm-with-example-form-container.tsx @@ -48,7 +48,7 @@ const PoiConfirmWithExampleFormContainer = ({ const makeSettingsRequest = (settings: TValues) => { const request = filterObjProperties( settings, - rest_state?.changeable_fields ? [...rest_state?.changeable_fields] : [] + rest_state?.changeable_fields ? [...rest_state.changeable_fields] : [] ); if (request.first_name) {