Fix reporter breaking because of ConsoleShortcuts

This commit is contained in:
Nuckyz 2024-05-29 06:45:44 -03:00
parent 537fc5e33d
commit c8602ef52b
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -205,7 +205,12 @@ page.on("console", async e => {
} }
if (isVencord) { if (isVencord) {
const args = await Promise.all(e.args().map(a => a.jsonValue())); let args: unknown[] = [];
try {
args = await Promise.all(e.args().map(a => a.jsonValue()));
} catch {
return;
}
const [, tag, message] = args as Array<string>; const [, tag, message] = args as Array<string>;
const cause = await maybeGetError(e.args()[3]); const cause = await maybeGetError(e.args()[3]);