From 37db45e6512df3adba7cabb5f2f3ac3bc3c93144 Mon Sep 17 00:00:00 2001 From: Tomakava Date: Thu, 3 Oct 2019 11:41:53 +0300 Subject: [PATCH] fix unhighlightAll performance issue (#648) --- src/scripts/choices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/choices.js b/src/scripts/choices.js index 4881197..b1c4448 100644 --- a/src/scripts/choices.js +++ b/src/scripts/choices.js @@ -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();