From 5eef6d403a57c224eec836d9d98787c6a128c50a Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Thu, 6 Jun 2024 18:29:48 +0300 Subject: [PATCH] check for existing help mode button --- src/lib/help-mode/help-button/help-button.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/help-mode/help-button/help-button.component.ts b/src/lib/help-mode/help-button/help-button.component.ts index b086ab7..e7a949f 100644 --- a/src/lib/help-mode/help-button/help-button.component.ts +++ b/src/lib/help-mode/help-button/help-button.component.ts @@ -62,7 +62,7 @@ export class HelpButtonComponent implements OnInit, AfterViewInit, OnDestroy { onResize() { const currentComponent = this._elementRef.nativeElement; const currentComponentRect = currentComponent.getBoundingClientRect(); - this.helpModeButton.style.setProperty('top', `${currentComponentRect.top}px`); - this.helpModeButton.style.setProperty('left', `${currentComponentRect.left}px`); + this.helpModeButton?.style.setProperty('top', `${currentComponentRect.top}px`); + this.helpModeButton?.style.setProperty('left', `${currentComponentRect.left}px`); } }