Skip to content

Commit

Permalink
fix unhighlightAll performance issue (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomakava authored and jshjohnson committed Oct 3, 2019
1 parent 57807e8 commit 37db45e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/choices.js
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,7 @@ class Choices {
this.hideDropdown();
}
} else {
const hasHighlightedItems = this._store.highlightedActiveItems;
const hasHighlightedItems = this._store.highlightedActiveItems.length > 0;

if (hasHighlightedItems) {
this.unhighlightAll();
Expand Down

0 comments on commit 37db45e

Please sign in to comment.