diff --git a/js/algoliasearch/internals/frontend/common.js b/js/algoliasearch/internals/frontend/common.js index 7cc5acf0..3548ea37 100644 --- a/js/algoliasearch/internals/frontend/common.js +++ b/js/algoliasearch/internals/frontend/common.js @@ -60,6 +60,8 @@ document.addEventListener("DOMContentLoaded", function (e) { }; window.transformHit = function (hit, price_key, helper) { + hit._highlightResult = hit._highlightResult || {}; + if (Array.isArray(hit.categories)) { hit.categories = hit.categories.join(', '); } @@ -539,4 +541,4 @@ document.addEventListener("DOMContentLoaded", function (e) { window.scrollTo(x, y); }; }); -}); \ No newline at end of file +});