Skip to content

Commit a8b39a2

Browse files
Nedunchezhiyan-Mmeta-codesync[bot]
authored andcommitted
Fix typo and missing space in AnimatedInterpolation error messages (#56378)
Summary: Fix two error message issues in `AnimatedInterpolation.js`: 1. **Typo**: "Cannot interpolation an input which is not a number" - should be "Cannot interpolate" 2. **Missing space**: Range validation message was missing a space between the variable name and "cannot", producing malformed output like `outputRangecannot be ]-infinity;+infinity[` ## Changelog: [GENERAL] [FIXED] - Fix typo "interpolation" to "interpolate" and add missing space in AnimatedInterpolation error messages Pull Request resolved: #56378 Test Plan: 1. Trigger the interpolation input validation by passing a non-number input to an interpolation config - verify the error message reads "Cannot interpolate an input which is not a number" 2. Trigger the range validation by passing an infinite range - verify the error message has proper spacing between the parameter name and "cannot" Reviewed By: zeyap Differential Revision: D100328205 Pulled By: javache fbshipit-source-id: ae2eba5404dd7b16bf430c26bc161a83821fa920
1 parent 64d4d7c commit a8b39a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native/Libraries/Animated/nodes/AnimatedInterpolation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function createNumericInterpolation(
7373
return input => {
7474
invariant(
7575
typeof input === 'number',
76-
'Cannot interpolation an input which is not a number',
76+
'Cannot interpolate an input which is not a number',
7777
);
7878

7979
const range = findRange(input, inputRange);
@@ -345,7 +345,7 @@ function checkInfiniteRange<
345345
* etc. If you really mean this implicit string conversion, you can do
346346
* something like String(myThing) */
347347
// $FlowFixMe[unsafe-addition]
348-
name + 'cannot be ]-infinity;+infinity[ ' + arr,
348+
name + ' cannot be ]-infinity;+infinity[ ' + arr,
349349
);
350350
}
351351

0 commit comments

Comments
 (0)