Merge pull request #167 from heimanba/main

fix: 🐛 保存模版时候,prevent 为undefined 导致puppeteer 超时
This commit is contained in:
ShawnPhang 2024-12-15 17:40:10 +08:00 committed by GitHub
commit 4104fafe52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,7 @@ const saveScreenshot = async (url: string, { path, width, height, thumbPath, siz
devices && (await page.emulate(devices))
}
// 自动模式下页面加载完毕立即截图
if (prevent === false) {
if (!prevent) {
page.on('load', async () => {
clearTimeout(regulators)
await autoScroll(page)