Handle nil node blocks gracefully in production (#2338)

This commit is contained in:
Adlai Holler
2016-10-03 20:06:13 -04:00
committed by GitHub
parent 0a2e35af38
commit 67045c07b8
2 changed files with 3 additions and 2 deletions

View File

@@ -959,7 +959,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
return ^{
__typeof__(self) strongSelf = weakSelf;
ASCellNode *node = block();
ASCellNode *node = (block != nil ? block() : [[ASCellNode alloc] init]);
[node enterHierarchyState:ASHierarchyStateRangeManaged];
if (node.interactionDelegate == nil) {
node.interactionDelegate = strongSelf;