浏览代码

Fixing 'Type mismatch' exception in destroy in IE11

Phazeshift 10 年之前
父节点
当前提交
39382fab08
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -850,7 +850,7 @@ the specific language governing permissions and limitations under the Apache Lic
 
             this.close();
 
-            if (element.length && element[0].detachEvent) {
+            if (element.length && element[0].detachEvent && self._sync) {
                 element.each(function () {
                     this.detachEvent("onpropertychange", self._sync);
                 });