mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(core): allow animationend to process if we don't have a longest animation (#64225)
There may be cases where the longest animation info has been cleaned up before the end animation fires. We should still do the end processing in that case. PR Close #64225
This commit is contained in:
parent
a52a2afb6e
commit
3b60eb4ace
1 changed files with 3 additions and 1 deletions
|
|
@ -233,9 +233,11 @@ export function isLongestAnimation(
|
|||
nativeElement: HTMLElement,
|
||||
): boolean {
|
||||
const longestAnimation = longestAnimations.get(nativeElement);
|
||||
// If we don't have any record of a longest animation, then we shouldn't
|
||||
// block the animationend/transitionend event from doing its work.
|
||||
if (longestAnimation === undefined) return true;
|
||||
return (
|
||||
nativeElement === event.target &&
|
||||
longestAnimation !== undefined &&
|
||||
((longestAnimation.animationName !== undefined &&
|
||||
(event as AnimationEvent).animationName === longestAnimation.animationName) ||
|
||||
(longestAnimation.propertyName !== undefined &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue