We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6667133 + 5f4c104 commit 0345dc7Copy full SHA for 0345dc7
src/adapter/to-instantsearch-highlight.ts
@@ -53,7 +53,7 @@ export const snippetValue: SnippetValue = (
53
let newValue = value
54
// manage a kind of `...` for the crop until this issue is solved: https://github.com/meilisearch/MeiliSearch/issues/923
55
// `...` is put if we are at the middle of a sentence (instead at the middle of the document field)
56
- if (snippetEllipsisText !== undefined && isString(newValue)) {
+ if (snippetEllipsisText !== undefined && isString(newValue) && newValue) {
57
if (
58
newValue[0] === newValue[0].toLowerCase() && // beginning of a sentence
59
newValue.startsWith('<em>') === false // beginning of the document field, otherwise MeiliSearch would crop around the highligh
0 commit comments