check if container has child before removing it

This commit is contained in:
meganrogge
2022-02-11 16:48:40 -06:00
parent 3f525fb960
commit 7d357b941f
+1 -1
View File
@@ -57,7 +57,7 @@ export class DecorationService extends Disposable implements IDecorationService
for (const decoration of this._decorations) {
decoration.dispose();
}
if (this._screenElement && this._container) {
if (this._screenElement && this._container && this._screenElement.contains(this._container)) {
this._screenElement.removeChild(this._container);
}
}