Skip to content

Commit d54dd67

Browse files
thePunderWomanAndrewKushnir
authored andcommitted
fix(core): Prevents early style pruning with leave animations (#64335)
In some cases, the leave animation stylesheets were getting pruned too early due to the renderer removal happening before the animation function was run. This ensures that while queuing a leave animation, we guarantee the lView is referenced in the leaving animations set. This guarantees the style sheet pruning knows about the animations existing and skips the prune step. fixes: #64326 PR Close #64335
1 parent 4f89ec3 commit d54dd67

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/core/src/render3/node_manipulation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ function runLeaveAnimationsWithCallback(
407407
return callback(false);
408408
}
409409

410+
if (lView) allLeavingAnimations.add(lView);
411+
410412
addToAnimationQueue(injector, () => {
411413
// it's possible that in the time between when the leave animation was
412414
// and the time it was executed, the data structure changed. So we need

0 commit comments

Comments
 (0)