Browse Source

Fix: Chat Assistant page goes blank #4566 (#4727)

### What problem does this PR solve?

Fix: Chat Assistant page goes blank #4566

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.16.0
balibabu 8 months ago
parent
commit
efbaa484d7
No account linked to committer's email address
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      web/src/pages/chat/markdown-content/index.tsx

+ 2
- 1
web/src/pages/chat/markdown-content/index.tsx View File

@@ -54,7 +54,8 @@ const MarkdownContent = ({
}, [content, loading, t]);

useEffect(() => {
setDocumentIds(reference?.doc_aggs?.map((x) => x.doc_id) ?? []);
const docAggs = reference?.doc_aggs;
setDocumentIds(Array.isArray(docAggs) ? docAggs.map((x) => x.doc_id) : []);
}, [reference, setDocumentIds]);

const handleDocumentButtonClick = useCallback(

Loading…
Cancel
Save