Browse Source

Merge pull request #2580 from Phazeshift/master

Fixing 'Type mismatch' exception in destroy in IE11
Kevin Brown 10 years ago
parent
commit
6df22fc4a8
1 changed files with 1 additions and 1 deletions
  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();
             this.close();
 
 
-            if (element.length && element[0].detachEvent) {
+            if (element.length && element[0].detachEvent && self._sync) {
                 element.each(function () {
                 element.each(function () {
                     this.detachEvent("onpropertychange", self._sync);
                     this.detachEvent("onpropertychange", self._sync);
                 });
                 });