diff --git a/web/src/pages/agent/constant/index.tsx b/web/src/pages/agent/constant/index.tsx index 869f247c0..4904a5985 100644 --- a/web/src/pages/agent/constant/index.tsx +++ b/web/src/pages/agent/constant/index.tsx @@ -1016,10 +1016,10 @@ export const initialPDFGeneratorValues = { watermark_text: '', enable_toc: false, outputs: { - file_path: { type: 'string', value: '' }, - pdf_base64: { type: 'string', value: '' }, - download: { type: 'string', value: '' }, - success: { type: 'boolean', value: false }, + file_path: { type: 'string' }, + pdf_base64: { type: 'string' }, + download: { type: 'string' }, + success: { type: 'boolean' }, }, }; diff --git a/web/src/pages/agent/form/components/output.tsx b/web/src/pages/agent/form/components/output.tsx index 73058b67b..e428c4651 100644 --- a/web/src/pages/agent/form/components/output.tsx +++ b/web/src/pages/agent/form/components/output.tsx @@ -14,7 +14,10 @@ type OutputProps = { isFormRequired?: boolean; } & PropsWithChildren; -export function transferOutputs(outputs: Record) { +export function transferOutputs(outputs: Record | undefined) { + if (!outputs) { + return []; + } return Object.entries(outputs).map(([key, value]) => ({ title: key, type: value?.type, @@ -35,7 +38,7 @@ export function Output({
{t('flow.output')} {children}
-