From 10f8cd4d2f30083c5f95793a1bb82222a3b5b311 Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Tue, 4 Apr 2017 11:31:27 +0300 Subject: [PATCH] Fix android PathInterpolator --- tns-core-modules/ui/animation/animation.android.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tns-core-modules/ui/animation/animation.android.ts b/tns-core-modules/ui/animation/animation.android.ts index 5126147b6..08e538cd4 100644 --- a/tns-core-modules/ui/animation/animation.android.ts +++ b/tns-core-modules/ui/animation/animation.android.ts @@ -70,10 +70,10 @@ export function _resolveAnimationCurve(curve: string | CubicBezierAnimationCurve } if (curve instanceof CubicBezierAnimationCurve) { return (android).support.v4.view.animation.PathInterpolatorCompat.create(curve.x1, curve.y1, curve.x2, curve.y2); - } else if (curve instanceof android.view.animation.Interpolator) { - return curve; + } else if (curve && (curve).getInterpolation) { + return curve; } else if ((curve) instanceof android.view.animation.LinearInterpolator) { - return curve; + return curve; } else { throw new Error(`Invalid animation curve: ${curve}`); }