Переглянути джерело

fix: undefined match the wrong output schema (#25971)

tags/1.9.0
Joel 1 місяць тому
джерело
коміт
1550316b8d
Аккаунт користувача з таким Email не знайдено

+ 1
- 1
web/app/components/workflow/nodes/_base/components/variable/use-match-schema-type.ts Переглянути файл

import matchTheSchemaType from './match-schema-type' import matchTheSchemaType from './match-schema-type'


export const getMatchedSchemaType = (obj: AnyObj, schemaTypeDefinitions?: SchemaTypeDefinition[]): string => { export const getMatchedSchemaType = (obj: AnyObj, schemaTypeDefinitions?: SchemaTypeDefinition[]): string => {
if(!schemaTypeDefinitions) return ''
if(!schemaTypeDefinitions || obj === undefined || obj === null) return ''
const matched = schemaTypeDefinitions.find(def => matchTheSchemaType(obj, def.schema)) const matched = schemaTypeDefinitions.find(def => matchTheSchemaType(obj, def.schema))
return matched ? matched.name : '' return matched ? matched.name : ''
} }

Завантаження…
Відмінити
Зберегти