This commit is contained in:
Nishan
2022-12-09 10:31:58 +05:30
parent bbeede82d3
commit 60dd791dd8

View File

@@ -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;
}