Properly detect downloadable chapter
This commit is contained in:
@@ -53,7 +53,7 @@ export class ChaptersWithMeta {
|
|||||||
static getDownloadable<Chapter extends ChapterWithMetaType>(chapters: Chapter[]): Chapter[] {
|
static getDownloadable<Chapter extends ChapterWithMetaType>(chapters: Chapter[]): Chapter[] {
|
||||||
return chapters.filter(
|
return chapters.filter(
|
||||||
({ chapter, downloadChapter }) =>
|
({ chapter, downloadChapter }) =>
|
||||||
!Chapters.isDownloaded(chapter) && downloadChapter?.state !== DownloadState.Error,
|
!Chapters.isDownloaded(chapter) && (!downloadChapter || downloadChapter?.state === DownloadState.Error),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user