diff --git a/select2.js b/select2.js index 58fa9ed6..09b0ffa0 100644 --- a/select2.js +++ b/select2.js @@ -441,7 +441,7 @@ the specific language governing permissions and limitations under the Apache Lic text = dataItem.text; // if text is not a function we assume it to be a key name if (!$.isFunction(text)) { - 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 + 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 text = function (item) { return item[dataText]; }; } } @@ -2641,7 +2641,6 @@ the specific language governing permissions and limitations under the Apache Lic // multi buildChangeDetails: function (old, current) { - console.log("current", current, "old", old); var current = current.slice(0), old = old.slice(0);