Skip to content

Commit

Permalink
Merge pull request #8 from feross/standard
Browse files Browse the repository at this point in the history
standard
  • Loading branch information
feross committed Mar 2, 2017
2 parents dea3408 + 5e0b962 commit a72704b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -13,7 +13,7 @@ module.exports = function blobToBuffer (blob, cb) {
function onLoadEnd (e) {
reader.removeEventListener('loadend', onLoadEnd, false)
if (e.error) cb(e.error)
else cb(null, new Buffer(reader.result))
else cb(null, Buffer.from(reader.result))
}

reader.addEventListener('loadend', onLoadEnd, false)
Expand Down

0 comments on commit a72704b

Please sign in to comment.