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 committed May 27, 2022
1 parent 65237df commit 03a26a1
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 03a26a1

Please sign in to comment.