From 6a1cb133cd6cbe2946e4c830291318e873da1d8b Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Mon, 1 May 2023 04:26:27 -0300 Subject: [PATCH] Fix blank errors on plugin reports (#1021) --- scripts/generateReport.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/generateReport.ts b/scripts/generateReport.ts index 935eae1..9044965 100644 --- a/scripts/generateReport.ts +++ b/scripts/generateReport.ts @@ -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); }