Files
Matthieu Riegler 8b15295e8c fix(core): release leavingNodes when animate.leave resolves to no classes
When an element with an `animate.leave` binding is detached,
`node_manipulation` eagerly records `{el, declarationView}` in the
module-level `leavingNodes` `WeakMap`. Previously, if `runLeaveAnimations`
resolved an empty class list (such as `''`, `[]`, `null`, or
`undefined`), it pushed a resolver and resolved immediately without
starting `animateLeaveClassRunner`, so `clearLeavingNodes` was never
called and every removed element and its declaration view remained
retained for the lifetime of the `TNode`.

Avoid registering a resolver or adding the view to `allLeavingAnimations`
when `activeClasses` is empty, and clear the tracked `leavingNodes` entry
from `node_animations` once leave animations settle (or when the
animation queue cannot be resolved). Clearing at settlement preserves
`leavingNodes` tracking and `declarationView` while composed or
descendant leave animations are still running, while keeping the cleanup
inside the tree-shaken animation runtime. Also delete empty `TNode`
entries from `leavingNodes` in `cancelLeavingNodes`.

Fixes #72141
2026-11-20 09:03:23 -08:00
..
…
…
2026-01-07 12:28:34 -05:00
…

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT