Skip to content

Commit 1923e6f

Browse files
committed
Fix nested object being transfom into [object, object] in highlight
1 parent af4fafb commit 1923e6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/format.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function replaceHighlightTags(
66
highlightPreTag?: string,
77
highlightPostTag?: string
88
): string {
9-
let newHighlightValue = value || ''
9+
let newHighlightValue = JSON.stringify(value) || ''
1010
// If the value of the attribute is a string,
1111
// the highlight is applied by MeiliSearch (<em> tags)
1212
// and we replace the <em> by the expected tag for InstantSearch

0 commit comments

Comments
 (0)