Quellcode durchsuchen

Merge pull request #2337 from snrmwg/master

Query term in tags function in select2 3.4 #2141
Kevin Brown vor 11 Jahren
Ursprung
Commit
fb6ef71ba0
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      select2.js

+ 2 - 2
select2.js

@@ -524,9 +524,9 @@ the specific language governing permissions and limitations under the Apache Lic
         var isFunc = $.isFunction(data);
         return function (query) {
             var t = query.term, filtered = {results: []};
-            var result = $(isFunc ? data(query) : data);
+            var result = isFunc ? data(query) : data;
             if ($.isArray(result)) {
-                $(isFunc ? data() : data).each(function () {
+                $(result).each(function () {
                     var isObject = this.text !== undefined,
                         text = isObject ? this.text : this;
                     if (t === "" || query.matcher(t, text)) {