Skip to content

Commit 6c65ba4

Browse files
authored
Update chromium.ts
1 parent 5bfd648 commit 6c65ba4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/_lib/chromium.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async function getPage() {
1515
export async function getScreenshot(url, width, height) {
1616
const page = await getPage();
1717
await page.goto(url);
18-
await page.setViewport({ width: width || 1366, height: height || 625 });
18+
await page.setViewport({ width: Number(width) || 1366, height: Number(height) || 625 });
1919
const file = await page.screenshot();
2020
return file;
2121
}

0 commit comments

Comments
 (0)