Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
intergalacticspacehighway committed Dec 9, 2022
1 parent bbeede8 commit 60dd791
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yoga/Yoga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,9 @@ static void YGJustifyMainAxis(
const YGLayout childLayout = child->getLayout();
const bool isLastChild = i == collectedFlexItemsValues.endOfLineIndex - 1;
// remove the gap if it is the last element of the line
betweenMainDim -= isLastChild ? gap : 0;
if (isLastChild) {
betweenMainDim -= gap;
}
if (childStyle.display() == YGDisplayNone) {
continue;
}
Expand Down

0 comments on commit 60dd791

Please sign in to comment.