From bee04ca9617118622d0f8bbab62ca40f1cbbddbc Mon Sep 17 00:00:00 2001 From: Zhisheng Huang Date: Sun, 11 Oct 2020 00:06:15 -0700 Subject: [PATCH] Remove useless infra assert Summary: Some product callsite just pass in nil object to this API thus keep causing the assertion. It's a bit too noisy and not much value here since we by default would still return `NSNotFound` here. Reviewed By: stavash Differential Revision: D24233480 fbshipit-source-id: 38b2eed3a9286bdd0a7eb0467894a13bbdca007a --- Source/IGListKit/Internal/IGListSectionMap.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/IGListKit/Internal/IGListSectionMap.m b/Source/IGListKit/Internal/IGListSectionMap.m index 8ed8c1a7..ad94dace 100644 --- a/Source/IGListKit/Internal/IGListSectionMap.m +++ b/Source/IGListKit/Internal/IGListSectionMap.m @@ -95,7 +95,9 @@ } - (NSInteger)sectionForObject:(id)object { - IGParameterAssert(object != nil); + if (object == nil) { + return NSNotFound; + } id sectionController = [self sectionControllerForObject:object]; if (sectionController == nil) {