mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-15 19:55:53 +08:00
fix
This commit is contained in:
parent
d2b5bea1d2
commit
c69ec77c60
@ -550,7 +550,7 @@ document.addEventListener('load', handlePageLoad);
|
|||||||
}
|
}
|
||||||
let error;
|
let error;
|
||||||
await Promise.race(ckpt).catch((err) => error = err);
|
await Promise.race(ckpt).catch((err) => error = err);
|
||||||
if (finalized) {
|
if (finalized && !error) {
|
||||||
yield { ...snapshot, screenshot } as PageSnapshot;
|
yield { ...snapshot, screenshot } as PageSnapshot;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -558,7 +558,7 @@ document.addEventListener('load', handlePageLoad);
|
|||||||
screenshot = await page.screenshot();
|
screenshot = await page.screenshot();
|
||||||
lastHTML = snapshot.html;
|
lastHTML = snapshot.html;
|
||||||
}
|
}
|
||||||
if (snapshot || screenshot) {
|
if (snapshot) {
|
||||||
yield { ...snapshot, screenshot } as PageSnapshot;
|
yield { ...snapshot, screenshot } as PageSnapshot;
|
||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user