fix bug where tagging was broken if strings instead of objects were used
This commit is contained in:
parent
e0f854d667
commit
2aeb3d5bd5
@ -297,7 +297,7 @@
|
|||||||
return function (query) {
|
return function (query) {
|
||||||
var t = query.term.toUpperCase(), filtered = {results: []};
|
var t = query.term.toUpperCase(), filtered = {results: []};
|
||||||
$(data).each(function () {
|
$(data).each(function () {
|
||||||
var isObject = "text" in this,
|
var isObject = this.text!==undefined,
|
||||||
text = isObject ? this.text : this;
|
text = isObject ? this.text : this;
|
||||||
if (t === "" || text.toUpperCase().indexOf(t) >= 0) {
|
if (t === "" || text.toUpperCase().indexOf(t) >= 0) {
|
||||||
filtered.results.push(isObject ? this : {id: this, text: this});
|
filtered.results.push(isObject ? this : {id: this, text: this});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user