diff --git a/packages/mdc-dialog/index.ts b/packages/mdc-dialog/index.ts index 52666100ac4..496a9d8400b 100644 --- a/packages/mdc-dialog/index.ts +++ b/packages/mdc-dialog/index.ts @@ -93,7 +93,7 @@ class MDCDialog extends MDCComponent { this.buttons_ = [].slice.call(this.root_.querySelectorAll(strings.BUTTON_SELECTOR)); this.defaultButton_ = this.root_.querySelector(strings.DEFAULT_BUTTON_SELECTOR); this.focusTrapFactory_ = focusTrapFactory; - this.initialFocusEl_ = initialFocusEl as HTMLElement; + this.initialFocusEl_ = initialFocusEl as HTMLElement | null; this.buttonRipples_ = []; for (const buttonEl of this.buttons_) {