From 0740c52a304302f61ff1669c6e5800f2785c0eb5 Mon Sep 17 00:00:00 2001 From: so95 Date: Fri, 22 Nov 2024 10:01:21 +0700 Subject: [PATCH] error when chunks is null --- web/src/components/retrieval-documents/index.tsx | 2 +- web/src/pages/search/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/retrieval-documents/index.tsx b/web/src/components/retrieval-documents/index.tsx index 50344370e1..f73f0f709f 100644 --- a/web/src/components/retrieval-documents/index.tsx +++ b/web/src/components/retrieval-documents/index.tsx @@ -35,7 +35,7 @@ const RetrievalDocuments = ({ > - {selectedDocumentIds.length ?? 0}/{documents.length} + {selectedDocumentIds?.length ?? 0}/{documents?.length ?? 0} {t('knowledgeDetails.filesSelected')} diff --git a/web/src/pages/search/index.tsx b/web/src/pages/search/index.tsx index f280d33beb..cfbb2c11e2 100644 --- a/web/src/pages/search/index.tsx +++ b/web/src/pages/search/index.tsx @@ -146,9 +146,9 @@ const SearchPage = () => { > - {chunks.length > 0 && ( + {chunks?.length > 0 && ( (