From 173534b502f3e60da056feede6a6dcc04271b35e Mon Sep 17 00:00:00 2001 From: William Martin Date: Mon, 26 May 2025 15:06:19 -0400 Subject: [PATCH] don't be lazy with TypeScript --- libs/components/src/a11y/a11y-cell.directive.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/components/src/a11y/a11y-cell.directive.ts b/libs/components/src/a11y/a11y-cell.directive.ts index 46a3b239ab7..1a89bd5fb62 100644 --- a/libs/components/src/a11y/a11y-cell.directive.ts +++ b/libs/components/src/a11y/a11y-cell.directive.ts @@ -15,8 +15,9 @@ export class A11yCellDirective implements FocusableElement { getFocusTarget() { let focusTarget: HTMLElement | undefined | null; - if (this.focusableChild()) { - focusTarget = this.focusableChild()!.getFocusTarget(); + const focusableChild = this.focusableChild(); + if (focusableChild) { + focusTarget = focusableChild.getFocusTarget(); } else { focusTarget = this.elementRef.nativeElement.querySelector("button, a"); }