Correctly check if child is flex by also accounting for undefined
Summary: We were incorrectly returning true for children which had no flex as the flex was nan and not 0. Differential Revision: D4346712 fbshipit-source-id: 69ef0bb3fe5b4fcd3b3e2fe5aa348529be40252a
This commit is contained in:
committed by
Facebook Github Bot
parent
85b8386ba1
commit
3d10ba5f72
@@ -825,7 +825,7 @@ static YGFlexDirection YGFlexDirectionCross(const YGFlexDirection flexDirection,
|
|||||||
|
|
||||||
static inline bool YGNodeIsFlex(const YGNodeRef node) {
|
static inline bool YGNodeIsFlex(const YGNodeRef node) {
|
||||||
return (node->style.positionType == YGPositionTypeRelative &&
|
return (node->style.positionType == YGPositionTypeRelative &&
|
||||||
(node->style.flexGrow != 0 || node->style.flexShrink != 0 || node->style.flex != 0));
|
(YGNodeStyleGetFlexGrow(node) != 0 || YGNodeStyleGetFlexShrink(node) != 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline float YGNodeDimWithMargin(const YGNodeRef node, const YGFlexDirection axis) {
|
static inline float YGNodeDimWithMargin(const YGNodeRef node, const YGFlexDirection axis) {
|
||||||
|
Reference in New Issue
Block a user