mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
ignore did-fail-load error code -3
bug with in-app-menu
This commit is contained in:
9
index.js
9
index.js
@ -160,7 +160,7 @@ app.once("browser-window-created", (event, win) => {
|
||||
loadPlugins(win);
|
||||
|
||||
win.webContents.on("did-fail-load", (
|
||||
event,
|
||||
_event,
|
||||
errorCode,
|
||||
errorDescription,
|
||||
validatedURL,
|
||||
@ -170,7 +170,6 @@ app.once("browser-window-created", (event, win) => {
|
||||
) => {
|
||||
const log = JSON.stringify({
|
||||
error: "did-fail-load",
|
||||
event,
|
||||
errorCode,
|
||||
errorDescription,
|
||||
validatedURL,
|
||||
@ -181,8 +180,10 @@ app.once("browser-window-created", (event, win) => {
|
||||
if (is.dev()) {
|
||||
console.log(log);
|
||||
}
|
||||
win.webContents.send("log", log);
|
||||
win.webContents.loadFile(path.join(__dirname, "error.html"));
|
||||
if( !(config.plugins.isEnabled("in-app-menu") && errorCode === -3)) { // -3 is a false positive with in-app-menu
|
||||
win.webContents.send("log", log);
|
||||
win.webContents.loadFile(path.join(__dirname, "error.html"));
|
||||
}
|
||||
});
|
||||
|
||||
win.webContents.on("will-prevent-unload", (event) => {
|
||||
|
||||
@ -7,7 +7,7 @@ function logToString(log) {
|
||||
}
|
||||
|
||||
module.exports = () => {
|
||||
ipcRenderer.on("log", (event, log) => {
|
||||
ipcRenderer.on("log", (_event, log) => {
|
||||
console.log(logToString(log));
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user