Properly test for the lack of node measure func

Sorry Hack Gods for putting this back to work :)
This commit is contained in:
Nicola Ferruzzi
2019-07-13 20:04:41 +02:00
committed by GitHub
parent 296982a29e
commit b35b3dea6a

View File

@@ -180,7 +180,7 @@ static YGConfigRef globalConfig;
// the measure function. Since we already know that this is a leaf, // the measure function. Since we already know that this is a leaf,
// this *should* be fine. Forgive me Hack Gods. // this *should* be fine. Forgive me Hack Gods.
const YGNodeRef node = self.node; const YGNodeRef node = self.node;
if (YGNodeHasMeasureFunc(node)) { if (!YGNodeHasMeasureFunc(node)) {
YGNodeSetMeasureFunc(node, YGMeasureView); YGNodeSetMeasureFunc(node, YGMeasureView);
} }