Fix: compatible with outputs data structure (#11432)

This commit is contained in:
KVOJJJin
2024-12-06 17:35:35 +08:00
committed by Joel
parent 898ea9bf0f
commit ffd1343a09
2 changed files with 4 additions and 4 deletions

View File

@ -35,12 +35,12 @@ const OutputPanel: FC<OutputPanelProps> = ({
for (const key in outputs) {
if (Array.isArray(outputs[key])) {
outputs[key].map((output: any) => {
if (output.dify_model_identity === '__dify__file__')
if (output?.dify_model_identity === '__dify__file__')
fileList.push(output)
return null
})
}
else if (outputs[key].dify_model_identity === '__dify__file__') {
else if (outputs[key]?.dify_model_identity === '__dify__file__') {
fileList.push(outputs[key])
}
}