Skip to content

Commit

Permalink
trim whitespace before searching
Browse files Browse the repository at this point in the history
  • Loading branch information
adityatelange committed Jan 30, 2021
1 parent 346ae95 commit 624b1d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/fastsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 624b1d0

Please sign in to comment.