Fix blank errors on plugin reports (#1021)

This commit is contained in:
Nuckyz 2023-05-01 04:26:27 -03:00 committed by GitHub
parent c6196dff81
commit 6a1cb133cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -194,9 +194,10 @@ page.on("console", async e => {
return a.toString();
}
})
).then(a => a.join(" "));
).then(a => a.join(" ").trim());
if (!text.startsWith("Failed to load resource: the server responded with a status of")) {
if (text.length && !text.startsWith("Failed to load resource: the server responded with a status of")) {
console.error("Got unexpected error", text);
report.otherErrors.push(text);
}