From a19ba586f7cfd7c2b994b4d9e35c3c699ce0c1ce Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Wed, 13 Jan 2016 13:34:20 -0700 Subject: [PATCH] Revert change that seems to have caused internal inconsistency in range controller --- AsyncDisplayKit/Details/ASRangeController.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index 92a8f4f066..0329ccfdf4 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -156,8 +156,7 @@ - (void)_updateVisibleNodeIndexPaths NSSet *indexPaths = [_layoutController indexPathsForScrolling:_scrollDirection rangeType:rangeType]; // Notify to remove indexpaths that are leftover that are not visible or included in the _layoutController calculated paths - // This value may be nil for the first call of this method. - NSMutableSet *removedIndexPaths = [_rangeTypeIndexPaths[rangeKey] mutableCopy]; + NSMutableSet *removedIndexPaths = _rangeIsValid ? [_rangeTypeIndexPaths[rangeKey] mutableCopy] : [NSMutableSet set]; [removedIndexPaths minusSet:indexPaths]; [removedIndexPaths minusSet:visibleNodePathsSet];