From 5409777e0bab3f7dd2725c000bdc52cbce17831d Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Thu, 22 Aug 2024 13:40:18 -0700 Subject: [PATCH] add edge case (#2216) --- web/src/components/search/DocumentDisplay.tsx | 3 +++ 1 file changed, 3 insertions(+) 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];