Fix crash if selected search scope somehow changes before the view is loaded
This commit is contained in:
parent
a99072dd7c
commit
37442bcb48
|
@ -180,6 +180,9 @@ class SearchResultsViewController: UIViewController, CollectionViewController {
|
|||
}
|
||||
|
||||
func performSearch(query: String?) {
|
||||
guard isViewLoaded else {
|
||||
return
|
||||
}
|
||||
guard let query = query, !query.isEmpty else {
|
||||
self.dataSource.apply(NSDiffableDataSourceSnapshot<Section, Item>())
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue