From df57e816f80eff860fd2cc7d50446ab552c3c907 Mon Sep 17 00:00:00 2001 From: Adam Kariv Date: Thu, 16 Nov 2023 11:52:04 +0200 Subject: [PATCH] fixes kolzchut/srm#686 --- projects/srm/src/app/card/card.component.ts | 2 +- projects/srm/src/app/quick-actions/quick-actions.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/srm/src/app/card/card.component.ts b/projects/srm/src/app/card/card.component.ts index e0140a0e..d23e6e14 100644 --- a/projects/srm/src/app/card/card.component.ts +++ b/projects/srm/src/app/card/card.component.ts @@ -43,7 +43,7 @@ export class CardComponent implements OnInit, OnChanges, AfterViewInit { ngAfterViewInit(): void { const first = this.el.nativeElement.querySelector('.visible app-card-action a') as HTMLElement; - first.classList.add('primary'); + first?.classList.add('primary'); this.obs.observe(first); } diff --git a/projects/srm/src/app/quick-actions/quick-actions.component.ts b/projects/srm/src/app/quick-actions/quick-actions.component.ts index ae089914..d4d2f19a 100644 --- a/projects/srm/src/app/quick-actions/quick-actions.component.ts +++ b/projects/srm/src/app/quick-actions/quick-actions.component.ts @@ -14,7 +14,7 @@ export class QuickActionsComponent implements AfterViewInit { ngAfterViewInit(): void { const first = this.el.nativeElement.querySelector('.visible app-card-action a') as HTMLElement; - first.classList.add('primary'); + first?.classList.add('primary'); } }