Correctly check if child is flex by also accounting for undefined

Differential Revision: D4346712

fbshipit-source-id: 69ef0bb3fe5b4fcd3b3e2fe5aa348529be40252a
This commit is contained in:
Emil Sjolander 2016-12-22 02:57:12 -08:00 committed by Facebook Github Bot
parent 008ad0200f
commit 18a2c2322b
1 changed files with 1 additions and 1 deletions

View File

@ -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) {