Skip to content

Commit 8904e42

Browse files
committed
correctly handle undefined placeholders. tweak to issue select2#1365
1 parent def8adc commit 8904e42

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
@@ -1662,7 +1662,7 @@ the specific language governing permissions and limitations under the Apache Lic
16621662
this.opts.element.attr("data-placeholder") || // jquery 1.4 compat
16631663
this.opts.element.data("placeholder") ||
16641664
this.opts.placeholder ||
1665-
((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.text());
1665+
((placeholderOption = this.getPlaceholderOption()) !== undefined ? placeholderOption.text() : undefined);
16661666
},
16671667

16681668
// abstract

0 commit comments

Comments
 (0)