Procházet zdrojové kódy

Fix empty Select2 input from throwing an error when attempting to selecting a value.

Kevin Chung před 12 roky
rodič
revize
770924ca8d
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -2361,7 +2361,7 @@
             return markup.join("");
         },
         formatSelection: function (data, container) {
-            return data.text;
+            return data ? data.text : undefined;
         },
         formatResultCssClass: function(data) {return undefined;},
         formatNoMatches: function () { return "No matches found"; },