From 5f8c878beca652062e7e418664a52d97c2e69253 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Tue, 30 Jan 2024 13:29:58 -0500 Subject: [PATCH] - fix EULA Signed-off-by: Dave Richer --- client/src/components/eula/eula.component.jsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/client/src/components/eula/eula.component.jsx b/client/src/components/eula/eula.component.jsx index e4b0eb326..e4c060444 100644 --- a/client/src/components/eula/eula.component.jsx +++ b/client/src/components/eula/eula.component.jsx @@ -53,13 +53,10 @@ const Eula = ({currentEula, currentUser, acceptEula}) => { const {accepted_terms, ...otherFormValues} = formValues; // Trim the values of the fields before submitting - const trimmedFormValues = { - first_name: otherFormValues.first_name.trim(), - last_name: otherFormValues.last_name.trim(), - business_name: otherFormValues.business_name.trim(), - address: otherFormValues.address.trim(), - phone_number: otherFormValues.phone_number.trim(), - }; + const trimmedFormValues = Object.entries(otherFormValues).reduce((acc, [key, value]) => { + acc[key] = typeof value === 'string' ? value.trim() : value; + return acc; + }, {}); await insertEulaAcceptance({ variables: {