Skip to content

Commit

Permalink
Support specific cases where the cover is not included in the meta or…
Browse files Browse the repository at this point in the history
… guide sections
  • Loading branch information
chrox committed Dec 29, 2024
1 parent 8997224 commit fcc449c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions epub.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ class Resources {
?.getAttribute('content'))
?? this.getItemByHref(this.guide
?.find(ref => ref.type.includes('cover'))?.href)
?? this.manifest.find(item => item.href.includes('cover')
&& item.mediaType.startsWith('image'))

this.cfis = CFI.fromElements($$itemref)
}
Expand Down

0 comments on commit fcc449c

Please sign in to comment.