Skip to content

Commit c8f5927

Browse files
committed
fix(algolia): hit and docs body lines need to be mutually exclusive
1 parent 4c7bc9f commit c8f5927

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/functions/algoliaResponse.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ export async function algoliaResponse(
4545

4646
const contentParts = [
4747
`<:${emojiName}:${emojiId}> ${bold(resolveHitToNamestring(hit))}${headlineSuffix ? ` ${headlineSuffix}` : ''}`,
48-
hit.content?.length ? `${truncate(decode(hit.content), 300)}` : null,
49-
docsBody?.lines.length ? docsBody.lines.at(0) : null,
48+
hit.content?.length ? `${truncate(decode(hit.content), 300)}` : docsBody?.lines.at(0),
5049
`${hyperlink('read more', hideLinkEmbed(hit.url))}`,
5150
].filter(Boolean) as string[];
5251

0 commit comments

Comments
 (0)