From 1b37a1a4d24f96c53fa8b0d2f770ae4324420a09 Mon Sep 17 00:00:00 2001 From: Matthew Gold Date: Mon, 10 Jun 2024 09:51:36 -0400 Subject: [PATCH] Fix no search results JS error. --- best-cigars-guide/blocks/search/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/best-cigars-guide/blocks/search/search.js b/best-cigars-guide/blocks/search/search.js index e17bc1d..09a41d0 100644 --- a/best-cigars-guide/blocks/search/search.js +++ b/best-cigars-guide/blocks/search/search.js @@ -157,9 +157,9 @@ async function renderResults(block, config, filteredData, searchTerms) { // optimize images searchResults.querySelectorAll('img').forEach((img) => img.closest('picture').replaceWith(createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }]))); } else { - const noResultsMessage = document.createElement('li'); + const noResultsMessage = document.createElement('div'); searchResults.classList.add('no-results'); - noResultsMessage.textContent = config.placeholders.searchNoResults || 'No results found.'; + noResultsMessage.textContent = 'No results found.'; searchResults.append(noResultsMessage); } }