remove event listener on destroy
This commit is contained in:
parent
307ee39bc2
commit
557f655c86
2
src/js/select2/core.js
vendored
2
src/js/select2/core.js
vendored
@ -443,6 +443,8 @@ define([
|
|||||||
if (this._observer != null) {
|
if (this._observer != null) {
|
||||||
this._observer.disconnect();
|
this._observer.disconnect();
|
||||||
this._observer = null;
|
this._observer = null;
|
||||||
|
} else if (this.$element[0].removeEventListener) {
|
||||||
|
this.$element[0].removeEventListener('DOMAttrModified', this._sync, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._sync = null;
|
this._sync = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user