Avoid crash when table is empty
This commit is contained in:
parent
9b2fa6acbe
commit
b48a7438ed
1 changed files with 3 additions and 1 deletions
|
|
@ -535,7 +535,9 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV
|
||||||
self.tapTabBarTime = currentTime
|
self.tapTabBarTime = currentTime
|
||||||
if duration < 0.35 {
|
if duration < 0.35 {
|
||||||
let topIndexPath = IndexPath(row: 0, section: 0)
|
let topIndexPath = IndexPath(row: 0, section: 0)
|
||||||
tableView.scrollToRow(at: topIndexPath, at: .bottom, animated: true)
|
if let _ = tableView.cellForRow(at: topIndexPath) {
|
||||||
|
tableView.scrollToRow(at: topIndexPath, at: .bottom, animated: true)
|
||||||
|
}
|
||||||
self.tapTabBarTime = 0
|
self.tapTabBarTime = 0
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue