Add an assertion inside IGListAdapterUpdater to see if fromObjects contains duplicate identifiers

Summary: Verify our assumption that the `fromObjects` should never contain duplicate identifiers.

Reviewed By: calimarkus

Differential Revision: D10410190

fbshipit-source-id: 4952698fee6373224b4c8395778009540c5ae380
This commit is contained in:
Zhisheng Huang 2018-10-16 12:51:33 -07:00 committed by Facebook Github Bot
parent 853b0377fc
commit ffb37d6826

View file

@ -132,6 +132,8 @@
return;
}
IGAssert(objectsWithDuplicateIdentifiersRemoved(fromObjects).count == fromObjects.count, @"The fromObjects has duplicate identifiers (it should already be dedupepd at this point).");
NSArray *toObjects = nil;
if (toObjectsBlock != nil) {
toObjects = objectsWithDuplicateIdentifiersRemoved(toObjectsBlock());