From 1550316b8d755b1a32ad64e169129b7d7a809bf5 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 19 Sep 2025 17:03:09 +0800 Subject: [PATCH] fix: undefined match the wrong output schema (#25971) --- .../nodes/_base/components/variable/use-match-schema-type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/_base/components/variable/use-match-schema-type.ts b/web/app/components/workflow/nodes/_base/components/variable/use-match-schema-type.ts index fdde6685de..2c0c91b7f5 100644 --- a/web/app/components/workflow/nodes/_base/components/variable/use-match-schema-type.ts +++ b/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 : '' }