Skip to content

Commit 72e6818

Browse files
committed
fix(collectionview): crash fix on iOS 14
1 parent c7e5ce9 commit 72e6818

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/collectionview/collectionview.ios.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@ export class CollectionView extends CollectionViewBase {
365365
});
366366

367367
const layoutView = this.nativeViewProtected.collectionViewLayout;
368+
if (!layoutView) {
369+
return;
370+
}
368371
if ((layoutView instanceof UICollectionViewFlowLayout && this._effectiveColWidth) || this._effectiveRowHeight) {
369372
// @ts-ignore
370373
layoutView.estimatedItemSize = layoutView.itemSize = CGSizeMake(layout.toDeviceIndependentPixels(this._effectiveColWidth), layout.toDeviceIndependentPixels(this._effectiveRowHeight));

0 commit comments

Comments
 (0)