Skip to content

Commit 557f655

Browse files
committed
remove event listener on destroy
1 parent 307ee39 commit 557f655

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/js/select2/core.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ define([
443443
if (this._observer != null) {
444444
this._observer.disconnect();
445445
this._observer = null;
446+
} else if (this.$element[0].removeEventListener) {
447+
this.$element[0].removeEventListener('DOMAttrModified', this._sync, false);
446448
}
447449

448450
this._sync = null;

0 commit comments

Comments
 (0)