-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
That accordion works normally
What is the current behavior?
In some cases a TypeError: Cannot read property 'pipe' of undefined is fired, breaking everything.
What are the steps to reproduce?
I tried to reproduce the behaviour but could not reproduce on StackBlitz.
If I remove the accordion wrapper, there are no problems with underlying expansion panels.
The error is fired here
apparently because _stateChanges results undefined.
At first I thought it was some problem of my code, but the bug presented itself in two different and unrelated occasions.
In both occasions I'm adding dynamically the component which is using the accordion: in one case I'm loading the component using ComponentFactoryResolver, in the second one I'm loading the component with the Router and putting it in a router-outlet.
This is my StackBlitz trial until now (as I said, it works fine, because I cannot pinpoint the real issue): https://stackblitz.com/edit/angular-material2-issue-netdsn
What is the use-case or motivation for changing an existing behavior?
It's broken.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.1.2
Material 6.4.7
TS 2.9.x
Is there anything else we should know?
Everything worked fine with Material 6.4.5, it broke when I upgraded to 6.4.7.
If anyone has suggestion in where I should look for further debugging, I'll be glad to try.