We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b899518 commit c4dd378Copy full SHA for c4dd378
tns-core-modules/ui/animation/keyframe-animation.ts
@@ -212,9 +212,14 @@ export class KeyframeAnimation implements KeyframeAnimationDefinition {
212
let animationDef = this.animations[index];
213
(<any>animationDef).target = view;
214
let animation = new Animation([animationDef]);
215
+ // Catch the animation cancel to prevent unhandled promise rejection warnings
216
animation.play().then(() => {
217
this.animate(view, index + 1, iterations);
- });
218
+ }).catch((error: any) => {
219
+ if (error.message.indexOf("Animation cancelled") < 0) {
220
+ throw error;
221
+ }
222
+ }); // tslint:disable-line
223
this._nativeAnimations.push(animation);
224
}
225
0 commit comments