From e48ce1a97a61681a63cb1b1bb85e79e398c82851 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Mon, 27 Nov 2023 18:42:44 +0530 Subject: [PATCH] Fixed: Coverted to String before applying trim function in order to handle numeric values. --- src/utils/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 6a344d7a..b93513bc 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -224,7 +224,7 @@ const convertToString = (parameter: any) => { // converts the entered value to the expected type used by the service const convertValue = (parameter: any) => { - const value = parameter.value.trim(); + const value = parameter.value.toString().trim(); if(!value) { return '' @@ -268,7 +268,7 @@ const generateJobCustomParameters = (requiredParameters: any, optionalParameters optionalParameters.map((parameter: any) => { // added this check to not show those optional params in the configuration card whose value is left empty in the parameter modal - if(parameter.value.trim()) { + if(parameter.value && parameter.value.toString().trim()) { jobCustomParameters[parameter.name] = convertValue(parameter) } })