diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js index 5f7af4a12f..ab4ee541e3 100644 --- a/docs/assets/js/search.js +++ b/docs/assets/js/search.js @@ -25,10 +25,10 @@ import Fuse from 'fuse.js' function search(searchTerm) { const trimmedSearchTerm = searchTerm ? searchTerm.trim() : '' - const searchResult = fuse.search(trimmedSearchTerm) iconListContainer.innerHTML = '' if (trimmedSearchTerm.length > 0) { + const searchResult = fuse.search(trimmedSearchTerm) const resultElements = searchResult.map(result => iconElementList[result.refIndex]) iconListContainer.append(...resultElements) } else {