diff --git a/OwlKit.podspec b/OwlKit.podspec index b91f898..939fc0c 100644 --- a/OwlKit.podspec +++ b/OwlKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "OwlKit" - s.version = "1.1.1" + s.version = "1.1.2" s.summary = "A declarative type-safe framework for building fast and flexible list with Tables & Collections" s.description = <<-DESC Owl offers a data-driven declarative approach for building fast & flexible list in iOS. It supports both UICollectionView & UITableView; UIStackView is on the way!. diff --git a/Sources/Owl/Table/TableDirector.swift b/Sources/Owl/Table/TableDirector.swift index 044dfa9..48d4ddd 100644 --- a/Sources/Owl/Table/TableDirector.swift +++ b/Sources/Owl/Table/TableDirector.swift @@ -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) }