Skip to content

Commit

Permalink
Don’t convert to string when we want the raw SVG buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jul 17, 2024
1 parent 1a48154 commit 11b680e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/format-hooks/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = async function createSvg(sharpInstance) {
let input = sharpInstance.options.input;
let svgBuffer = input.buffer;
if(svgBuffer) { // remote URL already has buffer
return svgBuffer.toString("utf-8");
return svgBuffer;
} else { // local file system
return fsp.readFile(input.file);
}
Expand Down

0 comments on commit 11b680e

Please sign in to comment.