Skip to content

Commit

Permalink
fix(js): pass children as array in highlight components
Browse files Browse the repository at this point in the history
This syntax is more conventional when using Fragments and Vue 3 didn't support the previous one.
  • Loading branch information
francoischalifour committed May 5, 2021
1 parent 0538d40 commit c2b202c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/autocomplete-js/src/components/Highlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function createHighlightComponent({
return createElement(
Fragment,
{},
...parseAlgoliaHitHighlight<THit>({ hit, attribute }).map((x, index) =>
parseAlgoliaHitHighlight<THit>({ hit, attribute }).map((x, index) =>
x.isHighlighted
? createElement(tagName, { key: index }, x.value)
: x.value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function createReverseHighlightComponent({
return createElement(
Fragment,
{},
...parseAlgoliaHitReverseHighlight<THit>({
parseAlgoliaHitReverseHighlight<THit>({
hit,
attribute,
}).map((x, index) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete-js/src/components/ReverseSnippet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function createReverseSnippetComponent({
return createElement(
Fragment,
{},
...parseAlgoliaHitReverseSnippet<THit>({
parseAlgoliaHitReverseSnippet<THit>({
hit,
attribute,
}).map((x, index) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete-js/src/components/Snippet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function createSnippetComponent({
return createElement(
Fragment,
{},
...parseAlgoliaHitSnippet<THit>({ hit, attribute }).map((x, index) =>
parseAlgoliaHitSnippet<THit>({ hit, attribute }).map((x, index) =>
x.isHighlighted
? createElement(tagName, { key: index }, x.value)
: x.value
Expand Down

0 comments on commit c2b202c

Please sign in to comment.