We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e9ed6b9 + ca859e4 commit fb6ef71Copy full SHA for fb6ef71
1 file changed
select2.js
@@ -524,9 +524,9 @@ the specific language governing permissions and limitations under the Apache Lic
524
var isFunc = $.isFunction(data);
525
return function (query) {
526
var t = query.term, filtered = {results: []};
527
- var result = $(isFunc ? data(query) : data);
+ var result = isFunc ? data(query) : data;
528
if ($.isArray(result)) {
529
- $(isFunc ? data() : data).each(function () {
+ $(result).each(function () {
530
var isObject = this.text !== undefined,
531
text = isObject ? this.text : this;
532
if (t === "" || query.matcher(t, text)) {
0 commit comments