Skip to content

Commit 2690053

Browse files
committed
Fixes select2#2434 Tagging support allows creation of tags that are only whitespace
1 parent a73d1b2 commit 2690053

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2953,7 +2953,7 @@ the specific language governing permissions and limitations under the Apache Lic
29532953
// multi
29542954
onSelect: function (data, options) {
29552955

2956-
if (!this.triggerSelect(data)) { return; }
2956+
if (!this.triggerSelect(data) || data.text === "") { return; }
29572957

29582958
this.addSelectedChoice(data);
29592959

0 commit comments

Comments
 (0)