We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91451aa commit 2ebf4a6Copy full SHA for 2ebf4a6
api/_lib/puppeteer.ts
@@ -18,7 +18,7 @@ async function getPage() {
18
export async function getScreenshot(url, width, height) {
19
const page = await getPage();
20
await page.setViewport({ width: Number(width) || 1280, height: Number(height) || 720, deviceScaleFactor: 2 });
21
- await page.goto(url);
+ await page.goto(url: url || './index.html');
22
await new Promise(r => setTimeout(r, 3000));
23
const file = await page.screenshot();
24
return file;
0 commit comments