From b35b3dea6a618e8a566cd8fa9945e8bf2b5fcdb8 Mon Sep 17 00:00:00 2001 From: Nicola Ferruzzi Date: Sat, 13 Jul 2019 20:04:41 +0200 Subject: [PATCH] Properly test for the lack of node measure func Sorry Hack Gods for putting this back to work :) --- YogaKit/Source/YGLayout.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YogaKit/Source/YGLayout.m b/YogaKit/Source/YGLayout.m index 35d00b96..4a9ab872 100644 --- a/YogaKit/Source/YGLayout.m +++ b/YogaKit/Source/YGLayout.m @@ -180,7 +180,7 @@ static YGConfigRef globalConfig; // the measure function. Since we already know that this is a leaf, // this *should* be fine. Forgive me Hack Gods. const YGNodeRef node = self.node; - if (YGNodeHasMeasureFunc(node)) { + if (!YGNodeHasMeasureFunc(node)) { YGNodeSetMeasureFunc(node, YGMeasureView); }