Skip to content

Commit

Permalink
Fixed: Coverted to String before applying trim function in order to h…
Browse files Browse the repository at this point in the history
…andle numeric values.
  • Loading branch information
ravilodhi committed Nov 27, 2023
1 parent 0e39f7d commit e48ce1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down Expand Up @@ -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)
}
})
Expand Down

0 comments on commit e48ce1a

Please sign in to comment.