Skip to content

Commit

Permalink
Replace undefined buffer with contents
Browse files Browse the repository at this point in the history
Pull Request URL:
#9
  • Loading branch information
georgephillips authored and shinnn committed Nov 4, 2015
1 parent 36fe8ca commit 79e8f08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function (opts) {
cp.on('close', function () {
var contents = Buffer.concat(ret, len);

if (err && (err.code !== 'EPIPE' || !isJpg(buffer))) {
if (err && (err.code !== 'EPIPE' || !isJpg(contents))) {
err = typeof err === 'string' ? new Error(err) : err;
err.fileName = file.path;
cb(err);
Expand Down

0 comments on commit 79e8f08

Please sign in to comment.