From 6a58ae4e80d37ca2ea4b916f8f148157a082a7a1 Mon Sep 17 00:00:00 2001 From: Henry Heng Date: Fri, 31 May 2024 23:41:21 +0100 Subject: [PATCH] Bugfix/In-mem VS not able to load document (#2542) fix where in-mem VS not able to load document --- packages/server/src/utils/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/utils/index.ts b/packages/server/src/utils/index.ts index 8edfcbac7a7..c9ea2682637 100644 --- a/packages/server/src/utils/index.ts +++ b/packages/server/src/utils/index.ts @@ -379,6 +379,7 @@ export const saveUpsertFlowData = (nodeData: INodeData, upsertHistory: Record nd.id === targetNodeId)?.data.category || '' - if (targetNodeCategory === 'Vector Stores') { + const targetNodeName = reactFlowNodes.find((nd) => nd.id === targetNodeId)?.data.name || '' + if (targetNodeCategory === 'Vector Stores' && targetNodeName !== 'memoryVectorStore') { return true } }