mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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
This commit is contained in:
committed by
Andrew Kushnir
parent
ab415f3d7f
commit
e228102378
@@ -407,6 +407,8 @@ function runLeaveAnimationsWithCallback(
|
||||
return callback(false);
|
||||
}
|
||||
|
||||
if (lView) allLeavingAnimations.add(lView);
|
||||
|
||||
addToAnimationQueue(injector, () => {
|
||||
// it's possible that in the time between when the leave animation was
|
||||
// and the time it was executed, the data structure changed. So we need
|
||||
|
||||
Reference in New Issue
Block a user