Skip to content

Commit

Permalink
Merge pull request #48 from bellots/master
Browse files Browse the repository at this point in the history
Added check if exists row and section on didEndEditing.
  • Loading branch information
malcommac authored Jul 24, 2020
2 parents ec1e9af + 0a757fc commit f6eae9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Owl/Table/TableDirector.swift
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,9 @@ extension TableDirector: UITableViewDataSource, UITableViewDelegate {

public func tableView(_ tableView: UITableView, didEndEditingRowAt indexPath: IndexPath?) {
guard let indexPath = indexPath else { return }
if indexPath.row >= tableView.numberOfRows(inSection: indexPath.section) {
return
}
let (model, adapter) = context(forItemAt: indexPath)
adapter.dispatchEvent(.didEndEdit, model: model, cell: nil, path: indexPath, params: nil)
}
Expand Down

0 comments on commit f6eae9b

Please sign in to comment.