Prechádzať zdrojové kódy

Array data with custom key (string) isn't returning matches. fixes #1179

Igor Vaynberg 12 rokov pred
rodič
commit
4a0851bce5
1 zmenil súbory, kde vykonal 1 pridanie a 2 odobranie
  1. 1 2
      select2.js

+ 1 - 2
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);