Don't search if input is empty
This commit is contained in:
@@ -83,7 +83,7 @@
|
|||||||
var input = removeAccents(document.getElementById('searchInput').value.toLowerCase());
|
var input = removeAccents(document.getElementById('searchInput').value.toLowerCase());
|
||||||
|
|
||||||
// 空的話就不搜尋了
|
// 空的話就不搜尋了
|
||||||
if (input === '') {
|
if (input.trim() === '') {
|
||||||
document.getElementById('results').innerHTML = '喜歡這個工具的話,請多到 <a href="https://nicechord.com" target="_blank">NiceChord.com</a> 逛逛喔!';
|
document.getElementById('results').innerHTML = '喜歡這個工具的話,請多到 <a href="https://nicechord.com" target="_blank">NiceChord.com</a> 逛逛喔!';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user