Fix resizer for detaching

This commit is contained in:
Dariusz Niemczyk 2021-08-24 18:22:06 +02:00
parent 1e1fc64769
commit d8e7fd3634
No known key found for this signature in database
GPG key ID: 3E8DC619E3C59A05

View file

@ -84,7 +84,7 @@ export default class Resizer<C extends IConfig = IConfig> {
}
public detach() {
const attachment = this?.config?.handler.parentElement ?? this.container;
const attachment = this?.config?.handler?.parentElement ?? this.container;
attachment.removeEventListener("mousedown", this.onMouseDown, false);
window.removeEventListener("resize", this.onResize);
}