diff --git a/packages/autocomplete-js/src/components/Highlight.ts b/packages/autocomplete-js/src/components/Highlight.ts index 3faa0cca5..19af576b5 100644 --- a/packages/autocomplete-js/src/components/Highlight.ts +++ b/packages/autocomplete-js/src/components/Highlight.ts @@ -14,7 +14,7 @@ export function createHighlightComponent({ return createElement( Fragment, {}, - ...parseAlgoliaHitHighlight({ hit, attribute }).map((x, index) => + parseAlgoliaHitHighlight({ hit, attribute }).map((x, index) => x.isHighlighted ? createElement(tagName, { key: index }, x.value) : x.value diff --git a/packages/autocomplete-js/src/components/ReverseHighlight.ts b/packages/autocomplete-js/src/components/ReverseHighlight.ts index f19ac4210..b6a80250c 100644 --- a/packages/autocomplete-js/src/components/ReverseHighlight.ts +++ b/packages/autocomplete-js/src/components/ReverseHighlight.ts @@ -14,7 +14,7 @@ export function createReverseHighlightComponent({ return createElement( Fragment, {}, - ...parseAlgoliaHitReverseHighlight({ + parseAlgoliaHitReverseHighlight({ hit, attribute, }).map((x, index) => diff --git a/packages/autocomplete-js/src/components/ReverseSnippet.ts b/packages/autocomplete-js/src/components/ReverseSnippet.ts index 11e0f5d69..f0f4e6d3f 100644 --- a/packages/autocomplete-js/src/components/ReverseSnippet.ts +++ b/packages/autocomplete-js/src/components/ReverseSnippet.ts @@ -14,7 +14,7 @@ export function createReverseSnippetComponent({ return createElement( Fragment, {}, - ...parseAlgoliaHitReverseSnippet({ + parseAlgoliaHitReverseSnippet({ hit, attribute, }).map((x, index) => diff --git a/packages/autocomplete-js/src/components/Snippet.ts b/packages/autocomplete-js/src/components/Snippet.ts index 910b7be5a..e1e933893 100644 --- a/packages/autocomplete-js/src/components/Snippet.ts +++ b/packages/autocomplete-js/src/components/Snippet.ts @@ -14,7 +14,7 @@ export function createSnippetComponent({ return createElement( Fragment, {}, - ...parseAlgoliaHitSnippet({ hit, attribute }).map((x, index) => + parseAlgoliaHitSnippet({ hit, attribute }).map((x, index) => x.isHighlighted ? createElement(tagName, { key: index }, x.value) : x.value