don't crash invite flow when contacts disabled

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent 94ec38dd0a
commit 40dead89e5

@ -274,7 +274,15 @@ open class ContactsPicker: UIViewController, UITableViewDelegate, UITableViewDat
open func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
let dataSource = filteredSections
guard dataSource.count >= section else {
return nil
}
if dataSource[section].count > 0 {
guard collation.sectionTitles.count >= section else {
return nil
}
return collation.sectionTitles[section]
} else {
return nil

Loading…
Cancel
Save