We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d60762c commit 9c73676Copy full SHA for 9c73676
api/_lib/puppeteer.js api/_lib/puppeteer.tsapi/_lib/puppeteer.js renamed to api/_lib/puppeteer.ts
@@ -1,17 +1,17 @@
1
import { launch, Page } from 'puppeteer-core';
2
import chrome from 'chrome-aws-lambda';
3
-let page = Page || null;
+let _page: Page | null;
4
5
async function getPage() {
6
- if (page) return page;
+ if (_page) return _page;
7
const options = {
8
args: chrome.args,
9
executablePath: await chrome.executablePath,
10
headless: chrome.headless
11
};
12
const browser = await launch(options);
13
- page = await browser.newPage();
14
- return page;
+ _page = await browser.newPage();
+ return _page;
15
}
16
17
export async function getScreenshot(url, width, height) {
0 commit comments