Fix crash due to force-unwrapping uninitialized search controller

Closes #395
This commit is contained in:
Shadowfacts 2023-05-27 15:31:02 -07:00
parent c0148bb770
commit f5f1be9f7d
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
explore.loadViewIfNeeded()
let search = secondaryNavController.viewControllers.first as! InlineTrendsViewController
if search.searchController.isActive {
if search.searchController?.isActive == true {
// Copy the search query from the search VC to the Explore VC's search controller.
let query = search.searchController.searchBar.text ?? ""
explore.searchController.searchBar.text = query