Do not show an error if the URL is unable to load

This commit is contained in:
Agampreet Singh
2023-07-26 17:56:44 +05:30
parent be4f74f829
commit ac493f11de

View File

@@ -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()}"`