Skip to content

Commit

Permalink
hide menu when zero filtered items, this prevents erroneous errors wh…
Browse files Browse the repository at this point in the history
…en enter or tab is hit after typing the trigger then typing to empty the list. (#3)
  • Loading branch information
rsbondi authored and mrsweaters committed May 20, 2016
1 parent 685955d commit 37a8a82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/tribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ if (!Array.prototype.find) {

this.current.filteredItems = items

if(!items.length) {
this.hideMenu();
return;
}

let ul = this.menu.querySelector('ul')

ul.innerHTML = ''
Expand Down

0 comments on commit 37a8a82

Please sign in to comment.