Fix the issue where local comics page can not been opened when there is a comic with empty chapter list. Close #309

This commit is contained in:
2025-03-31 16:10:14 +08:00
parent 7631fab86b
commit 90441af989

View File

@@ -342,7 +342,8 @@ class ComicChapters {
} else if (groupedChapters.isNotEmpty) { } else if (groupedChapters.isNotEmpty) {
return ComicChapters.grouped(groupedChapters); return ComicChapters.grouped(groupedChapters);
} else { } else {
throw ArgumentError("Empty chapter list"); // return a empty list.
return ComicChapters(chapters);
} }
} }