Explorar o código

correctly handle undefined placeholders. tweak to issue #1365

Igor Vaynberg %!s(int64=12) %!d(string=hai) anos
pai
achega
8904e42ef9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      select2.js

+ 1 - 1
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