mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Merge pull request #186 from montaggroup/propagate-getUrl-error
propapage the getUrl()-error up through replace.cssUrls()
This commit is contained in:
commit
af8be27eba
1 changed files with 5 additions and 3 deletions
|
@ -129,9 +129,11 @@ EPUBJS.replace.cssUrls = function(_store, base, text){
|
|||
matches.forEach(function(str){
|
||||
var full = EPUBJS.core.resolveUrl(base, str.replace(/url\(|[|\)|\'|\"]/g, ''));
|
||||
var replaced = _store.getUrl(full).then(function(url){
|
||||
text = text.replace(str, 'url("'+url+'")');
|
||||
});
|
||||
|
||||
text = text.replace(str, 'url("'+url+'")');
|
||||
}, function(reason) {
|
||||
deferred.reject(reason);
|
||||
});
|
||||
|
||||
promises.push(replaced);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue