diff --git a/src/hooks/useChatbot.ts b/src/hooks/useChatbot.ts index 600a34e..f2c0a2e 100644 --- a/src/hooks/useChatbot.ts +++ b/src/hooks/useChatbot.ts @@ -341,7 +341,7 @@ export function useChatbot(): ChatbotHookReturn { if (!workflowIdToStop && messages.length > 0) { // Try to extract workflowId from the latest message (supports workflowId and conversationId) const latestMessage = messages[messages.length - 1]; - workflowIdToStop = getConversationId(latestMessage) || undefined; + workflowIdToStop = getConversationId(latestMessage) ?? null; if (workflowIdToStop) { console.log('Extracted workflowId from latest message:', workflowIdToStop); }