From 67caac5aecf2044806ba8d8e2908143854101762 Mon Sep 17 00:00:00 2001 From: Oleg Ivaniv Date: Fri, 8 Nov 2024 08:48:30 +0100 Subject: [PATCH] Fix memoryOutputData --- .../src/components/CanvasChat/composables/useChatMessaging.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/CanvasChat/composables/useChatMessaging.ts b/packages/editor-ui/src/components/CanvasChat/composables/useChatMessaging.ts index bbb1e28402..2ceec6b54d 100644 --- a/packages/editor-ui/src/components/CanvasChat/composables/useChatMessaging.ts +++ b/packages/editor-ui/src/components/CanvasChat/composables/useChatMessaging.ts @@ -277,7 +277,7 @@ export function useChatMessaging({ const memoryOutputData = (nodeResultData ?? []) .map((data) => get(data, ['data', NodeConnectionType.AiMemory, 0, 0, 'json']) as MemoryOutput) - .find((data) => data.action === 'saveContext'); + .find((data) => data && data.action === 'saveContext'); return (memoryOutputData?.chatHistory ?? []).map((message, index) => { return {