mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update Java prop casting
Summary: Updates the casting for Java props Reviewed By: JoshuaGross Differential Revision: D16417805 fbshipit-source-id: 7881ff984527555a4905b62d83751ed2a43b1070
This commit is contained in:
committed by
Facebook Github Bot
parent
58d3cb2fff
commit
34505dba05
+3
-3
@@ -44,13 +44,13 @@ function getJavaValueForProp(
|
||||
case 'StringTypeAnnotation':
|
||||
return '(String) value';
|
||||
case 'Int32TypeAnnotation':
|
||||
return '(int) value';
|
||||
return '((Double) value).intValue()';
|
||||
case 'FloatTypeAnnotation':
|
||||
return '(Float) value';
|
||||
return '((Double) value).floatValue()';
|
||||
case 'NativePrimitiveTypeAnnotation':
|
||||
switch (typeAnnotation.name) {
|
||||
case 'ColorPrimitive':
|
||||
return '(Integer) value';
|
||||
return '((Double) value).intValue()';
|
||||
case 'ImageSourcePrimitive':
|
||||
return '(ReadableMap) value';
|
||||
case 'PointPrimitive':
|
||||
|
||||
Reference in New Issue
Block a user