fix: 🐛 保存模版时候,prevent 为undefined 导致puppeteer 超时

This commit is contained in:
heimanba 2024-12-15 22:08:17 +08:00
parent 4104fafe52
commit 72cc1b2a02

View File

@ -67,7 +67,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 () => {
await autoScroll()
await sleep(wait)