Uniqueness assert of section controllers, close #567

Summary:
Issue fixed: #567

- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/639

Differential Revision: D4878842

Pulled By: jessesquires

fbshipit-source-id: 664648cf4f5e28d0a6af308e30151cb66863962c
This commit is contained in:
heshamsalman 2017-04-12 16:11:51 -07:00 committed by Facebook Github Bot
parent 281e6416b2
commit 3c41fb15e5

View file

@ -529,6 +529,11 @@
}
[sectionControllers addObject:sectionController];
#if DEBUG
IGAssert([NSSet setWithArray:sectionControllers].count == sectionControllers.count,
@"Section controllers array is not filled with unique objects; section controllers are being reused");
#endif
[validObjects addObject:object];
}