From e44659e8bd3ef803b05571df141008db88257569 Mon Sep 17 00:00:00 2001 From: meganrogge Date: Fri, 11 Feb 2022 14:56:56 -0600 Subject: [PATCH] remove unused ID - can just use marker's --- src/browser/services/DecorationService.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/browser/services/DecorationService.ts b/src/browser/services/DecorationService.ts index df21d076..28f18a78 100644 --- a/src/browser/services/DecorationService.ts +++ b/src/browser/services/DecorationService.ts @@ -54,16 +54,14 @@ export class DecorationService extends Disposable implements IDecorationService for (const decoration of this._decorations) { decoration.dispose(); } - if (this._container) { - this._screenElement?.removeChild(this._container); + if (this._screenElement && this._container) { + this._screenElement.removeChild(this._container); } } } export class Decoration extends Disposable implements IDecoration { - private static _nextId = 1; private readonly _marker: IMarker; private _element: HTMLElement | undefined; - private readonly _id: number = Decoration._nextId++; public isDisposed: boolean = false; public get element(): HTMLElement | undefined { return this._element; }