Skip to content

Commit 4a0851b

Browse files
committed
Array data with custom key (string) isn't returning matches. fixes select2#1179
1 parent fd07c11 commit 4a0851b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

select2.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ the specific language governing permissions and limitations under the Apache Lic
441441
text = dataItem.text;
442442
// if text is not a function we assume it to be a key name
443443
if (!$.isFunction(text)) {
444-
dataText = data.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
444+
dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
445445
text = function (item) { return item[dataText]; };
446446
}
447447
}
@@ -2641,7 +2641,6 @@ the specific language governing permissions and limitations under the Apache Lic
26412641

26422642
// multi
26432643
buildChangeDetails: function (old, current) {
2644-
console.log("current", current, "old", old);
26452644
var current = current.slice(0),
26462645
old = old.slice(0);
26472646

0 commit comments

Comments
 (0)