From f2f20fc37bb351c678d4addcefbb57fe0d75d081 Mon Sep 17 00:00:00 2001 From: himaniraghav3 Date: Tue, 19 Aug 2025 12:23:42 +0530 Subject: [PATCH] PM-1616 Prevent undefined error --- src/apps/copilots/src/pages/copilot-request-form/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/copilots/src/pages/copilot-request-form/index.tsx b/src/apps/copilots/src/pages/copilot-request-form/index.tsx index 8fb9fcbb3..bbef38127 100644 --- a/src/apps/copilots/src/pages/copilot-request-form/index.tsx +++ b/src/apps/copilots/src/pages/copilot-request-form/index.tsx @@ -277,7 +277,7 @@ const CopilotRequestForm: FC<{}> = () => { message: 'Field cannot be left empty', }, { - condition: formValues.otherPaymentType.trim().length > 8, + condition: formValues.otherPaymentType && formValues.otherPaymentType.trim().length > 8, key: 'otherPaymentType', message: 'Field only allows 8 characters', },