Fix to ASDisplayNode so that in production, the faulty product code that returns nil for an ASLayoutSpec does not crash.

This commit is contained in:
Scott Goodson
2016-07-28 21:38:52 -07:00
parent 44de5287cc
commit 4258bb69d6

View File

@@ -1992,7 +1992,8 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
return _layoutSpecBlock(self, constrainedSize);
}
return nil;
ASDisplayNodeAssert(NO, @"-[ASDisplayNode layoutSpecThatFits:] should never fall through to return empty value");
return [[ASLayoutSpec alloc] init];
}
- (ASLayout *)calculatedLayout