Skip to content

Commit 8dfed8f

Browse files
committed
be safe and check if container contains element before removing
1 parent e720643 commit 8dfed8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser/services/DecorationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class Decoration extends Disposable implements IDecoration {
106106
}
107107

108108
private _createElement(renderService: IRenderService, shouldRecreate?: boolean): void {
109-
if (shouldRecreate && this._element) {
109+
if (shouldRecreate && this._element && this._container.contains(this._element)) {
110110
this._container.removeChild(this._element);
111111
}
112112
this._element = document.createElement('div');

0 commit comments

Comments
 (0)