Skip to content

Commit 87f3fd3

Browse files
author
farfromrefug
committed
fix(collectionview): ios: try to prevent error refreshVisibleItems when no visible items
1 parent 95ab9a5 commit 87f3fd3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/collectionview/index.ios.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,9 @@ export class CollectionView extends CollectionViewBase {
709709
const sizes: NSMutableArray<NSValue> = this._delegate instanceof UICollectionViewDelegateImpl ? this._delegate.cachedSizes : null;
710710

711711
const visibles = view.indexPathsForVisibleItems;
712+
if (visibles.count <= 0) {
713+
return;
714+
}
712715

713716
if (sizes) {
714717
const indexes: NSIndexPath[] = Array.from(visibles);

0 commit comments

Comments
 (0)