Skip to content

Commit 59914ae

Browse files
FavorMylikessehyeon1104
FavorMylikes
authored andcommittedJan 9, 2023
Update algolia-search-scripts.html (mmistakes#3102)
Fix issue mmistakes#3101
1 parent 40bf413 commit 59914ae

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)
Please sign in to comment.