mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fabric: Fixed incorrect usage of Undefined (instead of kFloatUndefined) in yogaValuesConversions
Summary: `Undefined` is actually equal `0` (becasuse it is `LayoutDirection::Undefined`), whereas `kFloatUndefined` is a magic huge number. Reviewed By: fkgozali Differential Revision: D7554550 fbshipit-source-id: 3ea37f0b8b6a59b4b0e00d205b75cd7252247d03
This commit is contained in:
1 parent
568529e1ec
commit
dd49f9e0bc
1 file changed
+2
-2
@@ -16,14 +16,14 @@ namespace react {
|
||||
|
||||
Float fabricFloatFromYogaFloat(float value) {
|
||||
if (value == YGUndefined) {
|
||||
return Undefined;
|
||||
return kFloatUndefined;
|
||||
}
|
||||
|
||||
return (Float)value;
|
||||
}
|
||||
|
||||
float yogaFloatFromFabricFloat(Float value) {
|
||||
if (value == Undefined) {
|
||||
if (value == kFloatUndefined) {
|
||||
return YGUndefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user