Skip to content

Commit e8a6eed

Browse files
mmalerbaamysorto
authored andcommitted
fix(material/chips): Declare that MatChipInput.inputElement is always defined (#23868)
It is initialized in the contructor, so there is no chance of it being undefined. (cherry picked from commit 72d2e5a)
1 parent 2fc63ef commit e8a6eed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/material-experimental/mdc-chips/chip-input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class MatChipInput implements MatChipTextControl, AfterContentInit, OnCha
136136
}
137137

138138
/** The native input element to which this directive is attached. */
139-
readonly inputElement: HTMLInputElement;
139+
readonly inputElement!: HTMLInputElement;
140140

141141
constructor(
142142
protected _elementRef: ElementRef<HTMLInputElement>,

src/material/chips/chip-input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class MatChipInput implements MatChipTextControl, OnChanges, OnDestroy, A
129129
}
130130

131131
/** The native input element to which this directive is attached. */
132-
readonly inputElement: HTMLInputElement;
132+
readonly inputElement!: HTMLInputElement;
133133

134134
constructor(
135135
protected _elementRef: ElementRef<HTMLInputElement>,

0 commit comments

Comments
 (0)