1
0
Fork 0
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:
dsk7 2015-01-10 16:21:27 +01:00
parent 0056b5f2c4
commit cb5b2353d5

View file

@ -75,6 +75,9 @@ EPUBJS.replace.links = function(_store, full, done, link){
setTimeout(function(){ setTimeout(function(){
done(url, full); done(url, full);
}, 5); //-- Allow for css to apply before displaying chapter }, 5); //-- Allow for css to apply before displaying chapter
}, function(reason) {
// we were unable to replace the style sheets
done(null);
}); });
}else{ }else{
_store.getUrl(full).then(done, function(reason) { _store.getUrl(full).then(done, function(reason) {
@ -100,10 +103,12 @@ EPUBJS.replace.stylesheets = function(_store, full) {
deferred.resolve(url); deferred.resolve(url);
}, function(e) { }, function(reason) {
console.error(e); deferred.reject(reason);
}); });
}, function(reason) {
deferred.reject(reason);
}); });
return deferred.promise; return deferred.promise;