Skip to content

Commit

Permalink
avoid writing to s3 bucket if html is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
smydbb committed Jan 23, 2024
1 parent e6367b5 commit 5de8b09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/libs/core/src/utils/renderUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const renderPageToHtml = async (

if (!html) {
console.log(
"html is empty, falling back to using page's rendering function for html"
"html is empty, the page will not be saved in S3"
);
html = (await page.renderReqToHTML(req, res)) as unknown as string;
renderOpts.isNotFound = true;
}

return { html, renderOpts };
Expand Down

0 comments on commit 5de8b09

Please sign in to comment.