Browse Source

Merge pull request #2481 from sbilstein/master

Fixes #2434 Prevents whitespace only tags from being created
Kevin Brown 11 năm trước cách đây
mục cha
commit
fdad112682
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);