Skip to content

Commit

Permalink
Update algolia-search-scripts.html (mmistakes#3102)
Browse files Browse the repository at this point in the history
Fix issue mmistakes#3101
  • Loading branch information
FavorMylikes authored May 27, 2022
1 parent e648fce commit 29699c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _includes/search/algolia-search-scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@

const hitTemplate = function(hit) {
const url = hit.url;
const title = hit._highlightResult.title.value;
const content = hit._highlightResult.html.value;
const hightlight = hit._highlightResult;
const title = hightlight.title && hightlight.title.value || "";
const content = hightlight.html && hightlight.html.value || "";

return `
<div class="list__item">
Expand Down

0 comments on commit 29699c8

Please sign in to comment.