fix: some subview didn't enable yoga, and crash with NaN frame
This commit is contained in:
@@ -442,9 +442,13 @@ static void YGApplyLayoutToViewHierarchy(UIView *view, BOOL preserveOrigin)
|
|||||||
{
|
{
|
||||||
NSCAssert([NSThread isMainThread], @"Framesetting should only be done on the main thread.");
|
NSCAssert([NSThread isMainThread], @"Framesetting should only be done on the main thread.");
|
||||||
|
|
||||||
|
if (!view.isYogaEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const YGLayout *yoga = view.yoga;
|
const YGLayout *yoga = view.yoga;
|
||||||
|
|
||||||
if (!yoga.isIncludedInLayout) {
|
if (!yoga.isEnabled || !yoga.isIncludedInLayout) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user