Skip to content

Commit 1433887

Browse files
committed
2 parents 2f5af90 + 03a26a1 commit 1433887

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

_includes/search/algolia-search-scripts.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919

2020
const hitTemplate = function(hit) {
2121
const url = hit.url;
22-
const title = hit._highlightResult.title.value;
23-
const content = hit._highlightResult.html.value;
22+
const hightlight = hit._highlightResult;
23+
const title = hightlight.title && hightlight.title.value || "";
24+
const content = hightlight.html && hightlight.html.value || "";
2425

2526
return `
2627
<div class="list__item">

0 commit comments

Comments
 (0)