mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
Fixed crash caused by empty chapter list.
This commit is contained in:
@@ -336,8 +336,10 @@ class ComicChapters {
|
||||
}
|
||||
if (chapters.isNotEmpty) {
|
||||
return ComicChapters(chapters);
|
||||
} else {
|
||||
} else if (groupedChapters.isNotEmpty) {
|
||||
return ComicChapters.grouped(groupedChapters);
|
||||
} else {
|
||||
throw ArgumentError("Empty chapter list");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user