Skip to content

Commit

Permalink
Check for data.contents existence
Browse files Browse the repository at this point in the history
* Fixes #320
  • Loading branch information
vivekkodira1 authored and kevva committed May 23, 2016
1 parent 1065131 commit 92963f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/imagemin.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function (grunt) {
}

var origSize = stats.size;
var diffSize = origSize - data[0].contents.length;
var diffSize = origSize - ((data[0].contents && data[0].contents.length) || 0);

totalSaved += diffSize;

Expand Down

0 comments on commit 92963f1

Please sign in to comment.