From 86ebd750033fc43321c8bd42ea5787737df286cd Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 5 Sep 2024 17:19:32 +0100 Subject: [PATCH] add fix for processing chunks --- packages/server/src/services/documentstore/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/server/src/services/documentstore/index.ts b/packages/server/src/services/documentstore/index.ts index a8a7f5912fc..b44b5c50ce3 100644 --- a/packages/server/src/services/documentstore/index.ts +++ b/packages/server/src/services/documentstore/index.ts @@ -589,12 +589,12 @@ const processAndSaveChunks = async (data: IDocumentStoreLoaderForPreview) => { found.totalChars = 0 found.status = DocumentStoreStatus.SYNCING entity.loaders = JSON.stringify(existingLoaders) - data.loaderId = found.loaderId - data.loaderName = found.loaderName - data.loaderConfig = found.loaderConfig - data.splitterId = found.splitterId - data.splitterName = found.splitterName - data.splitterConfig = found.splitterConfig + if (!data.loaderId) data.loaderId = found.loaderId + if (!data.loaderName) data.loaderName = found.loaderName + if (!data.loaderConfig) data.loaderConfig = found.loaderConfig + if (!data.splitterId) data.splitterId = found.splitterId + if (!data.splitterName) data.splitterName = found.splitterName + if (!data.splitterConfig) data.splitterConfig = found.splitterConfig if (found.credential) { data.credential = found.credential }