undo explosion

This commit is contained in:
Nuckyz 2024-05-28 04:27:36 -03:00
parent acbc932542
commit 9c2545ab16
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -41,9 +41,9 @@ const browser = await pup.launch({
const page = await browser.newPage(); const page = await browser.newPage();
await page.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"); await page.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36");
async function maybeGetError(handle: JSHandle) { async function maybeGetError(handle: JSHandle): Promise<string | undefined> {
return (handle as JSHandle<Error>).getProperty("message") return await (handle as JSHandle<Error>)?.getProperty("message")
.then(m => m?.jsonValue() ?? "Unknown Error"); .then(m => m?.jsonValue());
} }
const report = { const report = {
@ -236,7 +236,7 @@ page.on("console", async e => {
const [, name] = failedToStartMatch; const [, name] = failedToStartMatch;
report.badStarts.push({ report.badStarts.push({
plugin: name, plugin: name,
error: cause error: cause ?? "Unknown error"
}); });
break; break;