Skip to content

Commit

Permalink
Fix for stylesheets no rules
Browse files Browse the repository at this point in the history
  • Loading branch information
davatron5000 committed Aug 18, 2011
1 parent 8b4e816 commit bcecd67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deCSS3.js
Expand Up @@ -49,10 +49,10 @@ var deCSS3 = {
for(var i=0; i < document.styleSheets.length; i++) {
var stylesheet = document.styleSheets[i];

if(stylesheet.rules) {
var numRules = stylesheet.rules.length;
var rulesToDelete = [];

if(numRules) {
// -- loop each rule
for(var j=0; j < numRules; j++) {

Expand Down Expand Up @@ -97,9 +97,9 @@ var deCSS3 = {

}

rulesToDelete.reverse().forEach(function(element){
stylesheet.deleteRule(element);
});
rulesToDelete.reverse().forEach(function(element){
stylesheet.deleteRule(element);
});
}
}
return newRules;
Expand Down

0 comments on commit bcecd67

Please sign in to comment.