Skip to content

Commit

Permalink
Merge pull request #212 from cssstats/fix-bug-from-cssstats-core-update
Browse files Browse the repository at this point in the history
Fix bug integrating with new cssstats-core version
  • Loading branch information
johno committed Jul 11, 2016
2 parents 5e3dae2 + 60825bd commit affae87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ function parseTotals(stats) {
var totals = {};
var totalProperties = ['float', 'width', 'height', 'color', 'background-color'];
for(var property of totalProperties) {
totals[camelCase(property)] = stats.declarations.properties[property].length;
var prop = stats.declarations.properties[property];
totals[camelCase(property)] = prop ? prop.length : 0;
}

totals.fontSize = stats.declarations.getAllFontSizes().length;
Expand Down

0 comments on commit affae87

Please sign in to comment.