From 8490c257ef572c4e6313d314fe4bfe1735a34c0a Mon Sep 17 00:00:00 2001 From: Franco Serio Date: Sat, 13 Jan 2024 20:21:48 -0300 Subject: [PATCH] fix: Check if cover image is null before null check operator --- lib/src/entities/epub_book.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/entities/epub_book.dart b/lib/src/entities/epub_book.dart index 22872b6f..b87aeceb 100644 --- a/lib/src/entities/epub_book.dart +++ b/lib/src/entities/epub_book.dart @@ -40,8 +40,9 @@ class EpubBook { collections.listsEqual(AuthorList, other.AuthorList) && Schema == other.Schema && Content == other.Content && - collections.listsEqual( - CoverImage!.getBytes(), other.CoverImage!.getBytes()) && + ((CoverImage == null && other.CoverImage == null) || + (collections.listsEqual( + CoverImage!.getBytes(), other.CoverImage!.getBytes()))) && collections.listsEqual(Chapters, other.Chapters); } }