Skip to content

Commit

Permalink
Fix measure inner dimensions (#1114)
Browse files Browse the repository at this point in the history
Summary:
`YGFloatIsUndefined(collectedFlexItemsValues.totalFlexGrowFactors) &&            collectedFlexItemsValues.totalFlexGrowFactors == 0`  is not reachable.

X-link: facebook/yoga#1114

Reviewed By: NickGerleman

Differential Revision: D40203817

Pulled By: NickGerleman

fbshipit-source-id: 46a8c19dc0e097f4c28e7f48135f0382a557764a
  • Loading branch information
kinarobin authored and facebook-github-bot committed Oct 11, 2022
1 parent 2f58e52 commit 11f4743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ReactCommon/yoga/yoga/Yoga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 11f4743

Please sign in to comment.