diff --git a/Tusker/Screens/Search/SearchResultsViewController.swift b/Tusker/Screens/Search/SearchResultsViewController.swift index 6f4204af..63180cf7 100644 --- a/Tusker/Screens/Search/SearchResultsViewController.swift +++ b/Tusker/Screens/Search/SearchResultsViewController.swift @@ -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()) return