From 91b9ad2bef49b8dfc23053da74f8d3c8ab6eeb27 Mon Sep 17 00:00:00 2001 From: Akansha Sakhre Date: Wed, 20 Nov 2024 14:57:25 +0530 Subject: [PATCH] fixed deepscan issues --- .../Organization/Onboarding/Steps/SigningAuthority.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/containers/Organization/Onboarding/Steps/SigningAuthority.tsx b/src/containers/Organization/Onboarding/Steps/SigningAuthority.tsx index 24c1422e1..6d6c60d61 100644 --- a/src/containers/Organization/Onboarding/Steps/SigningAuthority.tsx +++ b/src/containers/Organization/Onboarding/Steps/SigningAuthority.tsx @@ -174,17 +174,19 @@ export const SigningAuthority = ({ handleStepChange, openReachOutToUs, saveData const setStates = (states: any) => { const { signing_authority, submitter } = states; - let name; + let firstName; + let lastName; if (signing_authority?.name) { - name = signing_authority?.name.split(' '); + firstName = signing_authority?.name?.split(' ')[0]; + lastName = signing_authority?.name?.split(' ')[1]; } setSubmitterFirstName(submitter?.first_name); setSubmitterLastName(submitter?.last_name); setSubmitterEmail(submitter?.email); setSubmitterDesignation(submitter?.designation); - setSigningAuthorityFirstName(name[0] || ''); - setSigningAuthorityLastName(name[1] || ''); + setSigningAuthorityFirstName(firstName || ''); + setSigningAuthorityLastName(lastName || ''); setSigningAuthorityDesignation(signing_authority?.designation); setSigningAuthorityEmail(signing_authority?.email); setPermissions({ support_staff_account: false, terms_agreed: false });