From e7f2aeaf084ae11bcf1d056502a79ab4aa8e30a2 Mon Sep 17 00:00:00 2001 From: Stephen Starkey Date: Tue, 5 Mar 2013 10:31:28 -0600 Subject: [PATCH] Don't update results if maximumSelectionSize is 0 a maximumSelectionSize of zero means unlimited, which means we shouldn't be updating results if it's set to 0 --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 9d471f29..6bb69577 100644 --- a/select2.js +++ b/select2.js @@ -2325,7 +2325,7 @@ the specific language governing permissions and limitations under the Apache Lic if (this.countSelectableResults()>0) { this.search.width(10); this.resizeSearch(); - if (this.val().length >= this.getMaximumSelectionSize()) { + if (this.getMaximumSelectionSize() > 0 && this.val().length >= this.getMaximumSelectionSize()) { // if we reached max selection size repaint the results so choices // are replaced with the max selection reached message this.updateResults(true);