Skip to content

Commit 2490624

Browse files
thePunderWomanmmalerba
authored andcommitted
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
1 parent 08b8b13 commit 2490624

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/animation/utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,11 @@ export function isLongestAnimation(
233233
nativeElement: HTMLElement,
234234
): boolean {
235235
const longestAnimation = longestAnimations.get(nativeElement);
236+
// If we don't have any record of a longest animation, then we shouldn't
237+
// block the animationend/transitionend event from doing its work.
238+
if (longestAnimation === undefined) return true;
236239
return (
237240
nativeElement === event.target &&
238-
longestAnimation !== undefined &&
239241
((longestAnimation.animationName !== undefined &&
240242
(event as AnimationEvent).animationName === longestAnimation.animationName) ||
241243
(longestAnimation.propertyName !== undefined &&

0 commit comments

Comments
 (0)