1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

propapage the getUrl()-error up through replace.cssUrls()

This commit is contained in:
dsk7 2015-01-13 20:22:47 +01:00
parent 2b27889de2
commit eed4d0720f

View file

@ -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);
});