Skip to content

Commit 1f09c7a

Browse files
committed
fix options with empty values. fixes select2#1497
1 parent 247223a commit 1f09c7a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

select2.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
Copyright 2012 Igor Vaynberg
33
44
Version: @@ver@@ Timestamp: @@timestamp@@
@@ -2057,7 +2057,8 @@ the specific language governing permissions and limitations under the Apache Lic
20572057

20582058
isPlaceholderOptionSelected: function() {
20592059
var placeholderOption;
2060-
return ((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.is(':selected')) ||
2060+
return this.opts.placeholder &&
2061+
((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.is(':selected')) ||
20612062
(this.opts.element.val() === "") ||
20622063
(this.opts.element.val() === undefined) ||
20632064
(this.opts.element.val() === null);

0 commit comments

Comments
 (0)