From 624b1d0afb76652bc555f745612748dd80dbb6a4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 30 Jan 2021 11:54:34 +0530 Subject: [PATCH] trim whitespace before searching --- assets/js/fastsearch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/fastsearch.js b/assets/js/fastsearch.js index 3b7061a7..f2f50385 100644 --- a/assets/js/fastsearch.js +++ b/assets/js/fastsearch.js @@ -52,7 +52,7 @@ function activeToggle() { sInput.onkeyup = function (e) { // run a search query (for "term") every time a letter is typed // in the search box - const results = fuse.search(this.value); // the actual query being run using fuse.js + const results = fuse.search(this.value.trim()); // the actual query being run using fuse.js if (results.length !== 0) { // build our html if result exists