Open vanilla-sky opened 5 years ago
the post content code line: this.urls.indexOf(path.replace('/OEBPS/', "")); only change this line,then return right coverurl
/**
@return {string} url */
}, { key: "get", value: function get(path) {
var indexInUrls = this.urls.indexOf(path.replace('/OEBPS/', "")); if (indexInUrls === -1) { return; } if (this.replacementUrls.length) { return new Promise(function (resolve, reject) { resolve(this.replacementUrls[indexInUrls]); }.bind(this)); } else { return this.createUrl(path); } }
For me this did not work (or I did not understand your patch). I've created a PR https://github.com/futurepress/epub.js/pull/1056 to fix this. It also demonstrates the issue in a test to prevent regressions.
/**
@return {string} url */
}, { key: "get", value: function get(path) {