diff --git a/ElectronNET.Host/main.js b/ElectronNET.Host/main.js index f7c4d05..e3b9741 100644 --- a/ElectronNET.Host/main.js +++ b/ElectronNET.Host/main.js @@ -51,6 +51,20 @@ app.on('will-finish-launching', () => { app.on('before-quit-for-update', () => { ignoreApiProcessClosed = true; + + const windows = BrowserWindow.getAllWindows(); + if (windows.length) { + windows.forEach(w => { + try { + w.hide(); + w.destroy(); + } + catch { + //ignore, probably already destroyed + } + }); + } + }); const manifestJsonFile = require(manifestJsonFilePath);