Explorar el Código

Use more specific selector for finding options of a select

Alexander Zaytsev hace 11 años
padre
commit
67699746b4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1708,7 +1708,7 @@ the specific language governing permissions and limitations under the Apache Lic
         // abstract
         getPlaceholderOption: function() {
             if (this.select) {
-                var firstOption = this.select.children().first();
+                var firstOption = this.select.children('option').first();
                 if (this.opts.placeholderOption !== undefined ) {
                     //Determine the placeholder option based on the specified placeholderOption setting
                     return (this.opts.placeholderOption === "first" && firstOption) ||