mirror of
https://gitee.com/ByteDance/flowgram.ai.git
synced 2025-07-07 17:43:29 +08:00
fix: empty object missing in variable tree (#391)
This commit is contained in:
parent
d21cdae3ea
commit
e385211484
@ -62,10 +62,6 @@ export function useVariableTree(params: {
|
||||
children = (type.properties || [])
|
||||
.map((_property) => renderVariable(_property as VariableField, [...parentFields, variable]))
|
||||
.filter(Boolean) as TreeNodeData[];
|
||||
|
||||
if (!children?.length) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
const keyPath = [...parentFields.map((_field) => _field.key), variable.key];
|
||||
|
||||
@ -61,10 +61,6 @@ export function useVariableTree(params: {
|
||||
children = (type.properties || [])
|
||||
.map((_property) => renderVariable(_property as VariableField, [...parentFields, variable]))
|
||||
.filter(Boolean) as TreeNodeData[];
|
||||
|
||||
if (!children?.length) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
const keyPath = [...parentFields.map((_field) => _field.key), variable.key];
|
||||
@ -76,6 +72,7 @@ export function useVariableTree(params: {
|
||||
const isSchemaExclude = excludeSchema
|
||||
? JsonSchemaUtils.isASTMatchSchema(type, excludeSchema)
|
||||
: false;
|
||||
|
||||
const isSchemaMatch = isSchemaInclude && !isSchemaExclude;
|
||||
|
||||
// If not match, and no children, return null
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user