bug(stepper): access to undefined #30864
Labels
area: cdk/stepper
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Is this a regression?
The previous version in which this bug was not present was
No response
Description
In steppers _updateSelectedItemIndex() this._keyManager is used without checking for undefined.
A problem occurs when calling reset(); after getting the stepper element from viewChild("stepper");
Reproduction
You can see the problem in the sources. No StackBlitz needed.
Expected Behavior
Calling reset() without TypeError
Actual Behavior
TypeError: Cannot read properties of undefined (reading 'updateActiveItem')
Environment
The text was updated successfully, but these errors were encountered: