From efdcfec88fee49295c702fad700f0c1ac3164961 Mon Sep 17 00:00:00 2001 From: Kinarobin Date: Tue, 11 Oct 2022 03:38:35 -0700 Subject: [PATCH] Fix measure inner dimensions (#1114) Summary: `YGFloatIsUndefined(collectedFlexItemsValues.totalFlexGrowFactors) && collectedFlexItemsValues.totalFlexGrowFactors == 0` is not reachable. Pull Request resolved: https://github.com/facebook/yoga/pull/1114 Reviewed By: NickGerleman Differential Revision: D40203817 Pulled By: NickGerleman fbshipit-source-id: 46a8c19dc0e097f4c28e7f48135f0382a557764a --- yoga/Yoga.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index 24907ea0..e246895e 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -2952,10 +2952,10 @@ static void YGNodelayoutImpl( availableInnerMainDim = maxInnerMainDim; } else { if (!node->getConfig()->useLegacyStretchBehaviour && - ((YGFloatIsUndefined( + ((!YGFloatIsUndefined( collectedFlexItemsValues.totalFlexGrowFactors) && collectedFlexItemsValues.totalFlexGrowFactors == 0) || - (YGFloatIsUndefined(node->resolveFlexGrow()) && + (!YGFloatIsUndefined(node->resolveFlexGrow()) && node->resolveFlexGrow() == 0))) { // If we don't have any children to flex or we can't flex the node // itself, space we've used is all space we need. Root node also