Skip to content

Commit

Permalink
Fix no search results JS error.
Browse files Browse the repository at this point in the history
  • Loading branch information
codecodeio committed Jun 10, 2024
1 parent 42b0a41 commit 1b37a1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions best-cigars-guide/blocks/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 1b37a1a

Please sign in to comment.