From 18a2c2322b5104c0eca4a53b160991349211430a Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Thu, 22 Dec 2016 02:57:12 -0800 Subject: [PATCH] Correctly check if child is flex by also accounting for undefined Differential Revision: D4346712 fbshipit-source-id: 69ef0bb3fe5b4fcd3b3e2fe5aa348529be40252a --- ReactCommon/yoga/yoga/Yoga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactCommon/yoga/yoga/Yoga.c b/ReactCommon/yoga/yoga/Yoga.c index e207a9b81560bb..4762cee4fbe3e5 100644 --- a/ReactCommon/yoga/yoga/Yoga.c +++ b/ReactCommon/yoga/yoga/Yoga.c @@ -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) {