Skip to content

Commit 3b1e841

Browse files
Pawel Chmielkzaher
authored andcommitted
Fixed crash for using estimatedHeightForRow and dataSource
1 parent faced50 commit 3b1e841

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/DataSources/TableViewSectionedDataSource.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ open class TableViewSectionedDataSource<S: SectionModelType>
233233
}
234234

235235
open override func _rx_tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
236+
guard _sectionModels.count > section else { return 0 }
236237
return _sectionModels[section].items.count
237238
}
238239

0 commit comments

Comments
 (0)