mirror of
https://github.com/remy/inliner.git
synced 2024-09-11 17:25:30 +03:00
parent
7459b98ef8
commit
e5b35fe352
@ -18,7 +18,8 @@ function image(url) {
|
||||
debug('image loaded: %s', url);
|
||||
|
||||
// if the url is SVG, let's compress and use the XML directly
|
||||
if (mime.lookup(url) === 'image/svg+xml' && !inliner.options.nosvg) {
|
||||
if (res.body && mime.lookup(url) === 'image/svg+xml' &&
|
||||
!inliner.options.nosvg) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
svgo.optimize(res.body.toString(), function (result) {
|
||||
debug('optimising svg');
|
||||
|
Loading…
Reference in New Issue
Block a user