Skip to content

Commit

Permalink
fix inlining png
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Nov 19, 2024
1 parent d321942 commit ff38a08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/protocol_file/jsenv_plugin_protocol_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export const jsenvPluginProtocolFile = ({
if (request && request.headers["sec-fetch-dest"] === "document") {
try {
const fileBuffer = readFileSync(urlObject);
const content = String(fileBuffer);
const content = CONTENT_TYPE.isTextual(contentType)
? String(fileBuffer)
: fileBuffer;
return {
content,
contentType,
Expand Down

0 comments on commit ff38a08

Please sign in to comment.