Skip to content

Commit c22a372

Browse files
jezzzmStrift
authored andcommitted
fix: check for string type instead
1 parent fe0e219 commit c22a372

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/autocomplete-client/src/search/fetchMeilisearchResults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ function isDefinedHighlightValue(
167167
input: PossibleHighlightResult
168168
): input is DefinedHighlightResult {
169169
if (Array.isArray(input)) {
170-
return input.every((r) => r.value !== undefined)
170+
return input.every((r) => typeof r.value === 'string')
171171
}
172172

173-
return input.value !== undefined
173+
return typeof input.value === 'string'
174174
}

0 commit comments

Comments
 (0)