flexsearch: only display 'no results' message if search query is not empty
This commit is contained in:
parent
af6c51f6f2
commit
4d9221d7a4
|
@ -134,7 +134,7 @@ Source:
|
|||
suggestions.classList.remove('d-none');
|
||||
|
||||
// inform user that no results were found
|
||||
if (flatResults.size === 0) {
|
||||
if (flatResults.size === 0 && searchQuery) {
|
||||
const noResultsMessage = document.createElement('div')
|
||||
noResultsMessage.innerHTML = `No results for "<strong>${searchQuery}</strong>"`
|
||||
noResultsMessage.classList.add("suggestion__no-results");
|
||||
|
|
Loading…
Reference in New Issue