fix(editor): Fix inaccurate message in log view when input data is empty (#16234)

This commit is contained in:
Suguru Inoue
2025-06-16 12:09:57 +02:00
committed by GitHub
parent 3fcabd40b3
commit e93fd1a689
4 changed files with 54 additions and 14 deletions

View File

@@ -193,7 +193,8 @@ const contextItems = computed(() => {
return [];
}
const fields: Renders[] = flattenSchema({ schema, depth: 1 }).flatMap((renderItem) => {
const flatSchema = flattenSchema({ schema, depth: 1, isDataEmpty: false });
const fields: Renders[] = flatSchema.flatMap((renderItem) => {
const isVars =
renderItem.type === 'item' && renderItem.depth === 1 && renderItem.title === '$vars';
@@ -320,7 +321,14 @@ const flattenedNodes = computed(() =>
);
const flattenNodeSchema = computed(() =>
nodeSchema.value ? flattenSchema({ schema: nodeSchema.value, depth: 0, level: -1 }) : [],
nodeSchema.value
? flattenSchema({
schema: nodeSchema.value,
depth: 0,
level: -1,
isDataEmpty: props.data.length === 0,
})
: [],
);
/**