mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Continue rendering in case of missing stylesheets
propapage the getText()-errors up through replace.links() and replace.stylesheets()
This commit is contained in:
parent
0056b5f2c4
commit
cb5b2353d5
1 changed files with 7 additions and 2 deletions
|
@ -75,6 +75,9 @@ EPUBJS.replace.links = function(_store, full, done, link){
|
|||
setTimeout(function(){
|
||||
done(url, full);
|
||||
}, 5); //-- Allow for css to apply before displaying chapter
|
||||
}, function(reason) {
|
||||
// we were unable to replace the style sheets
|
||||
done(null);
|
||||
});
|
||||
}else{
|
||||
_store.getUrl(full).then(done, function(reason) {
|
||||
|
@ -100,10 +103,12 @@ EPUBJS.replace.stylesheets = function(_store, full) {
|
|||
|
||||
deferred.resolve(url);
|
||||
|
||||
}, function(e) {
|
||||
console.error(e);
|
||||
}, function(reason) {
|
||||
deferred.reject(reason);
|
||||
});
|
||||
|
||||
}, function(reason) {
|
||||
deferred.reject(reason);
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue