Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make sure to check array bounds in VirtualizedSectionList (#23710)
Summary: SectionList accesses items outside of the array bounds. This was discovered when using mobx, which warns you: `[mobx.array] Attempt to read an array index (${index}) that is out of bounds`. This is because `section.data[itemIndex + 1]` goes beyond array length. This PR adds an array length check and simplifies the code a bit to avoid repetitive `this.props.` Pull Request resolved: #23710 Differential Revision: D14298557 Pulled By: cpojer fbshipit-source-id: fee3422ad5b053d91a097c5842f46e78a149c3d5
- Loading branch information