mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 02:04:55 +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:
parent
568529e1ec
commit
dd49f9e0bc
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user