From 8904e42ef9e7e347270e4575f47e09a9c486a84d Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Mon, 3 Jun 2013 12:12:46 -0700 Subject: [PATCH] correctly handle undefined placeholders. tweak to issue #1365 --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 67d31ed3..3ebd2653 100644 --- a/select2.js +++ b/select2.js @@ -1662,7 +1662,7 @@ the specific language governing permissions and limitations under the Apache Lic this.opts.element.attr("data-placeholder") || // jquery 1.4 compat this.opts.element.data("placeholder") || this.opts.placeholder || - ((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.text()); + ((placeholderOption = this.getPlaceholderOption()) !== undefined ? placeholderOption.text() : undefined); }, // abstract