Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #42 from sverweij/master
Browse files Browse the repository at this point in the history
[svg-to-raster] replaces new Buffer(...) by Buffer.from(...)
  • Loading branch information
josa42 authored Feb 9, 2017
2 parents 5f00de5 + 68497bf commit c3f4cdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/svg-to-raster.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ exports.transform = (svg, outputType, callback) => {
dataURL = canvas.toDataURL(`image/${outputType}`, 0.8)

// extract the base64 encoded image, decode and return it
return callback(new Buffer(dataURL.replace(`data:image/${outputType};base64,`, ''), 'base64'))
return callback(Buffer.from(dataURL.replace(`data:image/${outputType};base64,`, ''), 'base64'))
})
}

0 comments on commit c3f4cdc

Please sign in to comment.