Skip to content

Commit cca6707

Browse files
authored
Merge pull request #645 from hotwax/bug/initial_load_products_job
Fixed: Converted to String before applying trim function in order to handle numeric values.
2 parents 0e39f7d + e48ce1a commit cca6707

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const convertToString = (parameter: any) => {
224224

225225
// converts the entered value to the expected type used by the service
226226
const convertValue = (parameter: any) => {
227-
const value = parameter.value.trim();
227+
const value = parameter.value.toString().trim();
228228

229229
if(!value) {
230230
return ''
@@ -268,7 +268,7 @@ const generateJobCustomParameters = (requiredParameters: any, optionalParameters
268268

269269
optionalParameters.map((parameter: any) => {
270270
// added this check to not show those optional params in the configuration card whose value is left empty in the parameter modal
271-
if(parameter.value.trim()) {
271+
if(parameter.value && parameter.value.toString().trim()) {
272272
jobCustomParameters[parameter.name] = convertValue(parameter)
273273
}
274274
})

0 commit comments

Comments
 (0)