diff --git a/web/src/components/search/DocumentDisplay.tsx b/web/src/components/search/DocumentDisplay.tsx index 1b80c8a0dfe7..5fb1c255b4eb 100644 --- a/web/src/components/search/DocumentDisplay.tsx +++ b/web/src/components/search/DocumentDisplay.tsx @@ -66,6 +66,9 @@ export const buildDocumentSummaryDisplay = ( sections.push(["...", false, false]); } }); + if (sections.length == 0) { + return; + } let previousIsContinuation = sections[0][2]; let previousIsBold = sections[0][1];