From c8f5927e5f6c756d184345b0bd6c3f372986814b Mon Sep 17 00:00:00 2001 From: almostSouji Date: Sat, 12 Oct 2024 22:28:42 +0200 Subject: [PATCH] fix(algolia): hit and docs body lines need to be mutually exclusive --- src/functions/algoliaResponse.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/functions/algoliaResponse.ts b/src/functions/algoliaResponse.ts index d10c016..142ef41 100644 --- a/src/functions/algoliaResponse.ts +++ b/src/functions/algoliaResponse.ts @@ -45,8 +45,7 @@ export async function algoliaResponse( const contentParts = [ `<:${emojiName}:${emojiId}> ${bold(resolveHitToNamestring(hit))}${headlineSuffix ? ` ${headlineSuffix}` : ''}`, - hit.content?.length ? `${truncate(decode(hit.content), 300)}` : null, - docsBody?.lines.length ? docsBody.lines.at(0) : null, + hit.content?.length ? `${truncate(decode(hit.content), 300)}` : docsBody?.lines.at(0), `${hyperlink('read more', hideLinkEmbed(hit.url))}`, ].filter(Boolean) as string[];