Skip to content

Commit

Permalink
fix(material/core): mark fields on HasErrorState as nullable (#28689)
Browse files Browse the repository at this point in the history
Updates a couple of the fields on `HasErrorState` to be nullable to align them with the `_ErrorStateTracker`.

Fixes #28688.

(cherry picked from commit a99d8e9)
  • Loading branch information
crisbeto committed Mar 6, 2024
1 parent 4dc2b52 commit fe01e29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/material/core/common-behaviors/error-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ type CanUpdateErrorStateCtor = Constructor<CanUpdateErrorState> &

/** @docs-private */
interface HasErrorState {
_parentFormGroup: FormGroupDirective;
_parentForm: NgForm;
_parentFormGroup: FormGroupDirective | null;
_parentForm: NgForm | null;
_defaultErrorStateMatcher: ErrorStateMatcher;

// These properties are defined as per the `MatFormFieldControl` interface. Since
// this mixin is commonly used with custom form-field controls, we respect the
// properties (also with the public name they need according to `MatFormFieldControl`).
ngControl: NgControl;
ngControl: NgControl | null;
stateChanges: Subject<void>;
}

Expand Down

0 comments on commit fe01e29

Please sign in to comment.