You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
If before this remove an element had started a leave animation, (E.G. by ng-if condition changing), that element will be removed immediately.
The removal causes the HTMLCollection to remove it also, which mutates the length of the HTMLCollection 'descendants' in the middle of the original removal loop, leading to an off by one error in the looping logic.
In the end, descendants.length is reduced but the loop variable l is kept at the original value. Once the loop variable i is larger than descendants.length, it passes undefined as the element to jqLightRemoveData which tries to access element.ng339
- https://github.com/angular/angular.js/blob/master/src/jqLite.js#L294
I'm not sure what the correct solution would be, as I have not been too involved in the development of angular. I've come up with three possible leads:
Update our iteration cap if the the HTMLCollection's length changes.
Some sort of check within ngAnimate to prevent short circuiting if it is going to be removed
Some pre-check on element before accessing element.ng339