Pārlūkot izejas kodu

Fixes #2434 Tagging support allows creation of tags that are only whitespace

Siegfried Bilstein 11 gadi atpakaļ
vecāks
revīzija
2690053010
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -2953,7 +2953,7 @@ the specific language governing permissions and limitations under the Apache Lic
         // multi
         onSelect: function (data, options) {
 
-            if (!this.triggerSelect(data)) { return; }
+            if (!this.triggerSelect(data) || data.text === "") { return; }
 
             this.addSelectedChoice(data);