소스 검색

correctly handle undefined placeholders. tweak to issue #1365

Igor Vaynberg 12 년 전
부모
커밋
8904e42ef9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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