Skip to content

Commit

Permalink
Improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
pmatter committed Nov 15, 2024
1 parent ca1df51 commit 58230b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const logger = pino({
level: process.env.LOG_LEVEL || "info",
});

export async function render(actualHtml, viewport, fullpage, style) {
export async function render(actualMhtml, viewport, fullpage, style) {
const renderer = new BrowserRenderer();
const workspaceDirectory = await fs.mkdtemp(
path.join(os.tmpdir(), "pixelpact-"),
);
const indexFile = `${workspaceDirectory}/index.mhtml`;
await fs.writeFile(indexFile, actualHtml);
await fs.writeFile(indexFile, actualMhtml);
try {
await renderer.start();
return await renderer.screenshot(`file://${indexFile}`, viewport, fullpage, style);
Expand Down

0 comments on commit 58230b3

Please sign in to comment.