Prechádzať zdrojové kódy

correctly handle undefined placeholders. tweak to issue #1365

Igor Vaynberg 12 rokov pred
rodič
commit
8904e42ef9
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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