Skip to content

Commit

Permalink
[options] Fix remove-empty-rulesets
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang authored and tonyganch committed Jul 11, 2016
1 parent e4c43d9 commit 5be0e4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/options/remove-empty-rulesets.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = (function() {
stylesheet.forEach('ruleset', function(ruleset, i) {
var block = ruleset.first('block');
processNode(block);
if (isEmptyBlock(block)) stylesheet.remove(i);
if (isEmptyBlock(block)) stylesheet.removeChild(i);
});
}

Expand All @@ -27,7 +27,7 @@ module.exports = (function() {
while (i-- > 0) {
if (node.get(i).is('space') && node.get(i + 1).is('space')) {
node.get(i).content += node.get(i + 1).content;
node.remove(i + 1);
node.removeChild(i + 1);
}
}
}
Expand Down

0 comments on commit 5be0e4f

Please sign in to comment.