1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 04:33:38 +00:00

don't be lazy with TypeScript

This commit is contained in:
William Martin
2025-05-26 15:06:19 -04:00
parent d99d128dc8
commit 173534b502

View File

@@ -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<HTMLElement>("button, a");
}