Fix crash due to force-unwrapping uninitialized search controller
Closes #395
This commit is contained in:
parent
c0148bb770
commit
f5f1be9f7d
|
@ -247,7 +247,7 @@ extension MainSplitViewController: UISplitViewControllerDelegate {
|
||||||
explore.loadViewIfNeeded()
|
explore.loadViewIfNeeded()
|
||||||
|
|
||||||
let search = secondaryNavController.viewControllers.first as! InlineTrendsViewController
|
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.
|
// Copy the search query from the search VC to the Explore VC's search controller.
|
||||||
let query = search.searchController.searchBar.text ?? ""
|
let query = search.searchController.searchBar.text ?? ""
|
||||||
explore.searchController.searchBar.text = query
|
explore.searchController.searchBar.text = query
|
||||||
|
|
Loading…
Reference in New Issue