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

This commit is contained in:
heimanba 2024-12-15 16:40:44 +08:00
parent 586adc8c79
commit 4175889ebb

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)