Fix: wait for networkidle event to ensure image load

This commit is contained in:
Jack King
2022-12-10 02:55:38 +08:00
parent 9af9a0284e
commit 8af6bfd5ae

View File

@ -58,6 +58,7 @@ export class PrinterService implements OnModuleInit, OnModuleDestroy {
await page.goto(`${url}/${username}/${slug}/printer?secretKey=${secretKey}`);
await page.waitForSelector('html.wf-active');
await page.waitForLoadState("networkidle")
const pageFormat: PageConfig['format'] = await page.$$eval(
'[data-page]',