Skip to content

Commit fb6ef71

Browse files
committed
Merge pull request select2#2337 from snrmwg/master
Query term in tags function in select2 3.4 select2#2141
2 parents e9ed6b9 + ca859e4 commit fb6ef71

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

select2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,9 @@ the specific language governing permissions and limitations under the Apache Lic
524524
var isFunc = $.isFunction(data);
525525
return function (query) {
526526
var t = query.term, filtered = {results: []};
527-
var result = $(isFunc ? data(query) : data);
527+
var result = isFunc ? data(query) : data;
528528
if ($.isArray(result)) {
529-
$(isFunc ? data() : data).each(function () {
529+
$(result).each(function () {
530530
var isObject = this.text !== undefined,
531531
text = isObject ? this.text : this;
532532
if (t === "" || query.matcher(t, text)) {

0 commit comments

Comments
 (0)