Skip to content

Commit

Permalink
Handle empty filename bug
Browse files Browse the repository at this point in the history
  • Loading branch information
grevory committed Oct 8, 2014
1 parent 3aaa340 commit e0f94eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/DfpUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@ module.exports.assetByteArray = function (filename) {
var fs = require('fs');
var bitmap = fs.readFileSync(filename);

if (!filename) {
return '';
}

return new Buffer(bitmap).toString('base64');
};

0 comments on commit e0f94eb

Please sign in to comment.