From ac493f11de8015b2a42f669a1c913d3cbf8ab018 Mon Sep 17 00:00:00 2001 From: Agampreet Singh <68941022+agam778@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:56:44 +0530 Subject: [PATCH] Do not show an error if the URL is unable to load --- app/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index 881ae71..186821b 100644 --- a/app/main.js +++ b/app/main.js @@ -109,7 +109,11 @@ app.on("web-contents-created", (event, contents) => { if (url.includes("page=Download")) { return { action: "allow" }; } else { - BrowserWindow.getFocusedWindow().loadURL(url); + BrowserWindow.getFocusedWindow() + .loadURL(url) + .catch((err) => { + // do not show error + }); if (getValue("discordrpcstatus") === "true") { setActivity( `On "${BrowserWindow.getFocusedWindow().webContents.getTitle()}"`