### 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
| @@ -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( | |||