mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-31 07:51:02 +00:00
fix: fix the fix for the fix for MangaUpdates
null is better than a crash
This commit is contained in:
@@ -43,9 +43,9 @@ class MangaUpdates {
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun getLatestChapter(results: MangaUpdatesResponse.Results): Int {
|
||||
fun getLatestChapter(results: MangaUpdatesResponse.Results): Int? {
|
||||
return results.metadata.series.latestChapter
|
||||
?: results.record.chapter!!.substringAfterLast("-").trim().toInt()
|
||||
?: results.record.chapter!!.substringAfterLast("-").trim().toIntOrNull()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user