Skip to content

Commit

Permalink
fix(material/chips): Declare that MatChipInput.inputElement is always…
Browse files Browse the repository at this point in the history
… defined (#23868)

It is initialized in the contructor, so there is no chance of it being
undefined.
  • Loading branch information
mmalerba committed Nov 8, 2021
1 parent 7dbe9a4 commit 72d2e5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-chips/chip-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class MatChipInput implements MatChipTextControl, AfterContentInit, OnCha
}

/** The native input element to which this directive is attached. */
readonly inputElement: HTMLInputElement;
readonly inputElement!: HTMLInputElement;

constructor(
protected _elementRef: ElementRef<HTMLInputElement>,
Expand Down
2 changes: 1 addition & 1 deletion src/material/chips/chip-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class MatChipInput implements MatChipTextControl, OnChanges, OnDestroy, A
}

/** The native input element to which this directive is attached. */
readonly inputElement: HTMLInputElement;
readonly inputElement!: HTMLInputElement;

constructor(
protected _elementRef: ElementRef<HTMLInputElement>,
Expand Down

0 comments on commit 72d2e5a

Please sign in to comment.