Fix crash in search activity

This commit is contained in:
Jay 2020-05-24 21:52:13 -04:00
parent 3c77ead449
commit b6bdc1fc0d

View File

@ -195,7 +195,7 @@ open class GlobalSearchController(
*/
fun setItems(searchResult: List<GlobalSearchItem>) {
if (extensionFilter != null) {
val results = searchResult.first().results
val results = searchResult.firstOrNull()?.results
if (results != null && results.size == 1) {
val manga = results.first().manga
router.replaceTopController(MangaDetailsController(manga, true)