浏览代码

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

tags/1.9.0
Joel 1 个月前
父节点
当前提交
1550316b8d
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      web/app/components/workflow/nodes/_base/components/variable/use-match-schema-type.ts

+ 1
- 1
web/app/components/workflow/nodes/_base/components/variable/use-match-schema-type.ts 查看文件

@@ -4,7 +4,7 @@ import type { AnyObj } from './match-schema-type'
import matchTheSchemaType from './match-schema-type'

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))
return matched ? matched.name : ''
}

正在加载...
取消
保存