From 72e490a036a36bf0d196242e98cee4f3b49dc4b6 Mon Sep 17 00:00:00 2001 From: genexliu Date: Fri, 14 Aug 2015 17:53:04 +0800 Subject: [PATCH] fix the issue that an iOS animation promise may never be resolved nor rejected --- ui/animation/animation.ios.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/animation/animation.ios.ts b/ui/animation/animation.ios.ts index e702cbde4..36c186f42 100644 --- a/ui/animation/animation.ios.ts +++ b/ui/animation/animation.ios.ts @@ -96,7 +96,7 @@ export class Animation extends common.Animation implements definition.Animation that._finishedAnimations++; } - if (that._cancelledAnimations === that._mergedPropertyAnimations.length) { + if (that._cancelledAnimations > 0 && (that._cancelledAnimations + that._finishedAnimations) === that._mergedPropertyAnimations.length) { trace.write(that._cancelledAnimations + " animations cancelled.", trace.categories.Animation); that._rejectAnimationFinishedPromise(); }