Skip to content

Commit

Permalink
Corrected CSSO API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
GreLI committed Apr 25, 2016
1 parent bb1fe4a commit df6f482
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/minifyStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ exports.fn = function(item, svgoOptions) {
DATA = styleCss.indexOf('>') >= 0 || styleCss.indexOf('<') >= 0 ? 'cdata' : 'text';
if(styleCss.length > 0) {
var styleCssMinified = csso.minify(styleCss, svgoOptions);
item.content[0][DATA] = styleCssMinified;
item.content[0][DATA] = styleCssMinified.css;
}
}

if(item.hasAttr('style')) {
var itemCss = item.attr('style').value;
if(itemCss.length > 0) {
var itemCssMinified = csso.minifyBlock(itemCss, svgoOptions);
item.attr('style').value = itemCssMinified;
item.attr('style').value = itemCssMinified.css;
}
}
}
Expand Down

0 comments on commit df6f482

Please sign in to comment.