From 90441af9892cfdc93817c1bf549636db87f2dc9e Mon Sep 17 00:00:00 2001 From: nyne Date: Mon, 31 Mar 2025 16:10:14 +0800 Subject: [PATCH] Fix the issue where local comics page can not been opened when there is a comic with empty chapter list. Close #309 --- lib/foundation/comic_source/models.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/foundation/comic_source/models.dart b/lib/foundation/comic_source/models.dart index f17c76d..47b20ca 100644 --- a/lib/foundation/comic_source/models.dart +++ b/lib/foundation/comic_source/models.dart @@ -342,7 +342,8 @@ class ComicChapters { } else if (groupedChapters.isNotEmpty) { return ComicChapters.grouped(groupedChapters); } else { - throw ArgumentError("Empty chapter list"); + // return a empty list. + return ComicChapters(chapters); } }