fix: handle undefined chat_input_field_list in refreshChatFieldList

This commit is contained in:
CaptainB 2025-12-29 17:47:39 +08:00
parent 2f73ac535a
commit 90a9ebd477

View File

@ -104,7 +104,7 @@ const refreshFieldList = () => {
const refreshChatFieldList = () => {
const chatFieldList = props.nodeModel.graphModel.nodes
.filter((v: any) => v.id === 'base-node')
.map((v: any) => cloneDeep(v.properties.chat_input_field_list))
.map((v: any) => cloneDeep(v.properties.chat_input_field_list || []))
.reduce((x: any, y: any) => [...x, ...y], [])
.map((i: any) => ({ label: i.label, value: i.field }))