Skip to content

Commit

Permalink
fix(utils/open-graph): handle timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
ythecombinator committed Apr 29, 2024
1 parent b51fecd commit 73f7c54
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/open-graph/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ async function generateImage({ width, height, content }: Required<ImageProps>) {
});

const page = await browser.newPage();
page.setDefaultTimeout(0);
page.setDefaultNavigationTimeout(0);

await page.setContent(content, { waitUntil: 'networkidle2' });
await page.waitForSelector('#body', {
visible: true,
Expand Down

0 comments on commit 73f7c54

Please sign in to comment.