From 39e7a8f568b23bcae3147f2411533204714ffeda Mon Sep 17 00:00:00 2001 From: Wiwi Kuan Date: Wed, 27 Dec 2023 11:25:19 +0800 Subject: [PATCH] Don't search if input is empty --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index b01d5d3..2afbabc 100644 --- a/index.html +++ b/index.html @@ -83,7 +83,7 @@ var input = removeAccents(document.getElementById('searchInput').value.toLowerCase()); // 空的話就不搜尋了 - if (input === '') { + if (input.trim() === '') { document.getElementById('results').innerHTML = '喜歡這個工具的話,請多到 NiceChord.com 逛逛喔!'; return; }