mirror of
https://github.com/palxiao/poster-design.git
synced 2025-07-03 03:56:41 +08:00
fix: 🐛 保存模版时候,prevent 为undefined 导致puppeteer 超时
This commit is contained in:
parent
586adc8c79
commit
4175889ebb
@ -40,7 +40,7 @@ const saveScreenshot = async (url: string, { path, width, height, thumbPath, siz
|
|||||||
devices && (await page.emulate(devices))
|
devices && (await page.emulate(devices))
|
||||||
}
|
}
|
||||||
// 自动模式下页面加载完毕立即截图
|
// 自动模式下页面加载完毕立即截图
|
||||||
if (prevent === false) {
|
if (!prevent) {
|
||||||
page.on('load', async () => {
|
page.on('load', async () => {
|
||||||
clearTimeout(regulators)
|
clearTimeout(regulators)
|
||||||
await autoScroll(page)
|
await autoScroll(page)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user