Explorar o código

Update select2.js

Fix an exception when called "destroy" on a still opened dropdown.
Cyril Nicodème %!s(int64=11) %!d(string=hai) anos
pai
achega
02d6e88747
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1194,7 +1194,7 @@ the specific language governing permissions and limitations under the Apache Lic
 
         // abstract
         opened: function () {
-            return this.container.hasClass("select2-dropdown-open");
+            return (this.container) ? this.container.hasClass("select2-dropdown-open") : false;
         },
 
         // abstract