Skip to content

Commit

Permalink
Correctly check if child is flex by also accounting for undefined
Browse files Browse the repository at this point in the history
Differential Revision: D4346712

fbshipit-source-id: 69ef0bb3fe5b4fcd3b3e2fe5aa348529be40252a
  • Loading branch information
Emil Sjolander authored and facebook-github-bot committed Dec 22, 2016
1 parent 008ad02 commit 18a2c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ReactCommon/yoga/yoga/Yoga.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ static YGFlexDirection YGFlexDirectionCross(const YGFlexDirection flexDirection,

static inline bool YGNodeIsFlex(const YGNodeRef node) {
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) {
Expand Down

0 comments on commit 18a2c23

Please sign in to comment.