cleanup dispose

This commit is contained in:
meganrogge
2022-02-11 15:01:07 -06:00
parent e44659e8bd
commit d8573e38a8
+6 -2
View File
@@ -126,9 +126,13 @@ export class Decoration extends Disposable implements IDecoration {
if (this.isDisposed) {
return;
}
this._container.removeChild(this._element!);
if (!this.marker.isDisposed) {
this.marker.dispose();
}
if (this._element) {
this._container.removeChild(this._element);
}
this.isDisposed = true;
this._marker.dispose();
// Emit before super.dispose such that dispose listeners get a change to react
this._onDispose.fire();
super.dispose();