Skip to content

Commit 5ab311c

Browse files
committed
Merge branch 'hotfix'
2 parents 3898e07 + 301d9e8 commit 5ab311c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Changelog/1.5.1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## Fixed
2+
- Fixed a bug that caused the app to crash when the list button was touched when no words were displayed.

Sources/iOSScenes/WordList/WordListViewController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ final class WordListViewController: RxBaseViewController, WordListViewController
126126
self.tabBarController?.rx.didSelect
127127
.asSignal()
128128
.emit(with: self) { owner, selectedViewController in
129-
if selectedViewController == self.navigationController {
129+
guard selectedViewController == self.navigationController else {
130+
return
131+
}
132+
133+
if owner.wordListTableView.visibleCells.count != 0 {
130134
owner.wordListTableView.scrollToRow(at: .init(row: 0, section: 0), at: .bottom, animated: true)
131135
}
132136
}

0 commit comments

Comments
 (0)