trim whitespace in searchString

This commit is contained in:
Hugo Bidois 2022-07-01 18:55:12 +02:00 committed by GitHub
parent 6519daeaef
commit 582ff71117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
search.addEventListener('input', e => { search.addEventListener('input', e => {
// grab search input value // grab search input value
const searchText = e.target.value.toLowerCase() const searchText = e.target.value.toLowerCase().trim()
const hasFilter = searchText.length > 0; const hasFilter = searchText.length > 0;