From 7d357b941f9ac3342545b430d16d8ea9a4093f75 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Fri, 11 Feb 2022 16:48:40 -0600 Subject: [PATCH] check if container has child before removing it --- src/browser/services/DecorationService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/services/DecorationService.ts b/src/browser/services/DecorationService.ts index a775be3f4..24ceebccc 100644 --- a/src/browser/services/DecorationService.ts +++ b/src/browser/services/DecorationService.ts @@ -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); } }