File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
packages/components/nodes/agentflow/HumanInput Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ class HumanInput_Agentflow implements INode {
208
208
humanInputDescription = ( nodeData . inputs ?. humanInputDescription as string ) || 'Do you want to proceed?'
209
209
const messages = [ ...pastChatHistory , ...runtimeChatHistory ]
210
210
// Find the last message in the messages array
211
- const lastMessage = ( messages [ messages . length - 1 ] as any ) . content || ''
211
+ const lastMessage = messages . length > 0 ? ( messages [ messages . length - 1 ] as any ) . content || '' : ''
212
212
humanInputDescription = `${ lastMessage } \n\n${ humanInputDescription } `
213
213
if ( isStreamable ) {
214
214
const sseStreamer : IServerSideEventStreamer = options . sseStreamer as IServerSideEventStreamer
You can’t perform that action at this time.
0 commit comments