Skip to content

Commit

Permalink
Ignored empty search tokens (#229)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergiu Coman <[email protected]>
  • Loading branch information
sergiucoman and Sergiu Coman authored Apr 12, 2024
1 parent 9da6353 commit 5650ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aemeds/blocks/blogheader/blogheader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 5650ba4

Please sign in to comment.