From 60dd791dd8d56e0fdb978ac3357030c200a2c130 Mon Sep 17 00:00:00 2001 From: Nishan Date: Fri, 9 Dec 2022 10:31:58 +0530 Subject: [PATCH] nit --- yoga/Yoga.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index 8b7b1c2b..1b5a5564 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -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; }