Skip to content

Commit

Permalink
error when chunks is null
Browse files Browse the repository at this point in the history
  • Loading branch information
isthaison committed Nov 22, 2024
1 parent db2a84d commit 0740c52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/components/retrieval-documents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const RetrievalDocuments = ({
>
<Space>
<span>
{selectedDocumentIds.length ?? 0}/{documents.length}
{selectedDocumentIds?.length ?? 0}/{documents?.length ?? 0}
</span>
{t('knowledgeDetails.filesSelected')}
</Space>
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ const SearchPage = () => {
></RetrievalDocuments>
<Divider></Divider>
<Spin spinning={loading}>
{chunks.length > 0 && (
{chunks?.length > 0 && (
<List
dataSource={chunks}
dataSource={chunks || []}
className={styles.chunks}
renderItem={(item) => (
<List.Item>
Expand Down

0 comments on commit 0740c52

Please sign in to comment.