修复开启启动时报错ReferenceError:mainWindow is not defined问题
This commit is contained in:
白柒 2023-11-18 16:31:04 +08:00
parent b982367793
commit 515944539c

View File

@ -141,13 +141,13 @@ app.on("window-all-closed", () => {
}); });
app.on("second-instance", () => { app.on("second-instance", () => {
if (mainWindow) { if (global.mainWindow) {
if (!mainWindow.isVisible()) { if (!global.mainWindow.isVisible()) {
mainWindow.show(); global.mainWindow.show();
mainWindow.focus(); global.mainWindow.focus();
global.blurHide = true; global.blurHide = true;
} else { } else {
mainWindow.focus(); global.mainWindow.focus();
} }
} }
}); });