fix: bing search response filter (#2519)
This commit is contained in:
parent
1ecbd95adf
commit
d8ab4474b4
6 changed files with 170 additions and 23 deletions
|
|
@ -57,7 +57,7 @@ export const addDefaultValue = (value: Record<string, any>, formSchemas: { varia
|
|||
const newValues = { ...value }
|
||||
formSchemas.forEach((formSchema) => {
|
||||
const itemValue = value[formSchema.variable]
|
||||
if (formSchema.default && (value === undefined || itemValue === null || itemValue === ''))
|
||||
if ((formSchema.default !== undefined) && (value === undefined || itemValue === null || itemValue === '' || itemValue === undefined))
|
||||
newValues[formSchema.variable] = formSchema.default
|
||||
})
|
||||
return newValues
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue