1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Fix for 528

This commit is contained in:
Sunil.Belakeri 2017-02-07 13:50:43 +05:30
parent dff2b040a0
commit c0533232d6
2 changed files with 3 additions and 5 deletions

View file

@ -406,10 +406,8 @@ class Contents {
} }
} }
} else if(typeof target === "string" && } else if(typeof target === "string") {
target.indexOf("#") > -1) { let id = target;
let id = target.substring(target.indexOf("#")+1);
let el = this.document.getElementById(id); let el = this.document.getElementById(id);
if(el) { if(el) {

View file

@ -243,7 +243,7 @@ class Rendition {
// removing the chapter // removing the chapter
if(!isCfiString && typeof target === "string" && if(!isCfiString && typeof target === "string" &&
target.indexOf("#") > -1) { target.indexOf("#") > -1) {
moveTo = target; moveTo = target.substring(target.indexOf("#")+1);
} }
if (isCfiString) { if (isCfiString) {