fix unhighlightAll performance issue (#648)

This commit is contained in:
Tomakava 2019-10-03 11:41:53 +03:00 committed by Josh Johnson
parent 57807e88f6
commit 37db45e651

View file

@ -1451,7 +1451,7 @@ class Choices {
this.hideDropdown(); this.hideDropdown();
} }
} else { } else {
const hasHighlightedItems = this._store.highlightedActiveItems; const hasHighlightedItems = this._store.highlightedActiveItems.length > 0;
if (hasHighlightedItems) { if (hasHighlightedItems) {
this.unhighlightAll(); this.unhighlightAll();