File tree 2 files changed +2
-6
lines changed
2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @epubjs-react-native/core" ,
3
- "version" : " 1.4.4 " ,
3
+ "version" : " 1.4.5 " ,
4
4
"description" : " A digital book reader in .opf .epub format for react native using epub.js library inside a webview." ,
5
5
"main" : " lib/commonjs/index" ,
6
6
"module" : " lib/module/index" ,
Original file line number Diff line number Diff line change @@ -87,11 +87,7 @@ export default `
87
87
88
88
function getCfiFromHref(book, href) {
89
89
const [_, id] = href.split('#')
90
- let section = book.spine.get(href.split('/')[1])
91
-
92
- if (!section) {
93
- section = book.spine.get(href);
94
- }
90
+ let section = book.spine.get(href.split('/')[1]) || book.spine.get(href) || book.spine.get(href.split('/').slice(1).join('/'))
95
91
96
92
const el = (id ? section.document.getElementById(id) : section.document.body)
97
93
return section.cfiFromElement(el)
You can’t perform that action at this time.
0 commit comments