From 1c8846079bba8ab15e955c6a011f68d6271e87a0 Mon Sep 17 00:00:00 2001 From: Zubair Date: Mon, 12 Jan 2015 19:04:07 -0500 Subject: [PATCH] replace this.$element.val() with this.current() --- src/js/select2/data/maximumSelectionLength.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/select2/data/maximumSelectionLength.js b/src/js/select2/data/maximumSelectionLength.js index 0fbc3b8e..4f6a50b5 100644 --- a/src/js/select2/data/maximumSelectionLength.js +++ b/src/js/select2/data/maximumSelectionLength.js @@ -10,7 +10,7 @@ define([ MaximumSelectionLength.prototype.query = function (decorated, params, callback) { - var count = this.$element.val() != null ? this.$element.val().length : 0; + var count = this.current() != null ? this.current().length : 0; if (count >= this.maximumSelectionLength) { this.trigger('results:message', { message: 'maximumSelected',