Skip to content

Commit

Permalink
Fix unique colors metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
t32k committed Mar 14, 2014
1 parent 51638c5 commit 37dbf63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/stylestats.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ StyleStats.prototype.getUniqueColor = function() {
if (Array.isArray(rule.declarations)) {
rule.declarations.forEach(function(declaration) {
if (declaration.property !== undefined) {
if (declaration.property.indexOf('color') > -1) {
if (declaration.property.match(/^color$/)) {
var color = declaration.value.replace(/\!important/, '');
color = color.toUpperCase().trim();
array.push(color);
Expand Down

0 comments on commit 37dbf63

Please sign in to comment.