From adc550e5dc72903cb3618cf680303b06c4a75466 Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Mon, 21 Oct 2024 16:54:11 +0800 Subject: [PATCH] fix: error --- .../components/workflow/nodes/knowledge-retrieval/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts index c38f9bedf4..2e490ae9c5 100644 --- a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts +++ b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts @@ -18,7 +18,9 @@ export const checkNodeValid = () => { return true } -export const getSelectedDatasetsMode = (datasets: DataSet[]) => { +export const getSelectedDatasetsMode = (datasets: DataSet[] = []) => { + if (datasets === null) + datasets = [] let allHighQuality = true let allHighQualityVectorSearch = true let allHighQualityFullTextSearch = true