diff --git a/ts/components/conversationList/MessageSearchResult.tsx b/ts/components/conversationList/MessageSearchResult.tsx index ba98edb1f..3478752b7 100644 --- a/ts/components/conversationList/MessageSearchResult.tsx +++ b/ts/components/conversationList/MessageSearchResult.tsx @@ -92,6 +92,10 @@ function getFilteredBodyRanges( body: string, bodyRanges: BodyRangesType ): BodyRangesType { + if (!bodyRanges.length) { + return []; + } + // Find where the snippet starts in the full text const stripped = snippet .replace(/<>/g, '')