From 685d61cf54c0fabb959edf5f5dcc01dec304005d Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Mon, 19 Jun 2023 13:55:40 -0700 Subject: [PATCH] fix(animation): css keyframes --- packages/core/ui/animation/index.ios.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/ui/animation/index.ios.ts b/packages/core/ui/animation/index.ios.ts index c5402be8b..c238a7e40 100644 --- a/packages/core/ui/animation/index.ios.ts +++ b/packages/core/ui/animation/index.ios.ts @@ -171,7 +171,9 @@ export class Animation extends AnimationBase { const animationFinishedCallback = (cancelled: boolean) => { if (this._playSequentially) { // This function will be called by the last animation when done or by another animation if the user cancels them halfway through. - this._resolveAnimationFinishedPromise(); + if (!cancelled) { + this._resolveAnimationFinishedPromise(); + } } else { // This callback will be called by each INDIVIDUAL animation when it finishes or is cancelled. if (cancelled) { @@ -184,7 +186,6 @@ export class Animation extends AnimationBase { if (Trace.isEnabled()) { Trace.write(this._cancelledAnimations + ' animations cancelled.', Trace.categories.Animation); } - this._resolveAnimationFinishedPromise(); } else if (this._finishedAnimations === this._mergedPropertyAnimations.length) { if (Trace.isEnabled()) { Trace.write(this._finishedAnimations + ' animations finished.', Trace.categories.Animation);