From cb1bdf1e37236f5147ee5ef745573c0ced1b4f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Osadnik?= Date: Wed, 6 Jun 2018 22:16:12 -0700 Subject: [PATCH] Change error message on interpolation (#19571) Summary: Change message in Animated.Interpolation to "inputRange must be monotonically non-decreasing" as it's allowed to give the same x's like in the test [example](https://github.com/facebook/react-native/blob/4435f087713e1d0ac3639e3b3196d71c6402898e/Libraries/Animated/src/__tests__/Interpolation-test.js#L71) Simply giving improper value of interpolation input [GENERAL] [MINOR] [AnimatedInterpolation.js] - Change error message on interpolation improper range error Closes https://github.com/facebook/react-native/pull/19571 Differential Revision: D8310791 Pulled By: TheSavior fbshipit-source-id: 803ef55104ad2a36231c5f18c0c089bd14822bf3 --- Libraries/Animated/src/nodes/AnimatedInterpolation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Animated/src/nodes/AnimatedInterpolation.js b/Libraries/Animated/src/nodes/AnimatedInterpolation.js index 067efbca731..8ee7cbba8a7 100644 --- a/Libraries/Animated/src/nodes/AnimatedInterpolation.js +++ b/Libraries/Animated/src/nodes/AnimatedInterpolation.js @@ -285,7 +285,7 @@ function checkValidInputRange(arr: Array) { * mean this implicit string conversion, you can do something like * String(myThing) */ - 'inputRange must be monotonically increasing ' + arr, + 'inputRange must be monotonically non-decreasing ' + arr, ); } }