diff --git a/aemeds/blocks/blogheader/blogheader.js b/aemeds/blocks/blogheader/blogheader.js index c9de93a..214dfd1 100644 --- a/aemeds/blocks/blogheader/blogheader.js +++ b/aemeds/blocks/blogheader/blogheader.js @@ -127,7 +127,7 @@ async function handleSearch(block) { searchResults.style.display = 'block'; searchResults.innerHTML = ''; - const searchTerms = searchValue.toLowerCase().split(/\s+/); + const searchTerms = searchValue.toLowerCase().split(/\s+/).filter((item) => item !== ''); const blogs = ffetch(BLOG_QUERY_INDEX) .chunks(CHUNK_SIZE) .sheet('blogs-content');