diff --git a/app/main.development.js b/app/main.development.js index 6bd9c0b7..8cace831 100644 --- a/app/main.development.js +++ b/app/main.development.js @@ -34,6 +34,13 @@ app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit() }) +app.on('will-quit', () => { + if (backendProcess) { + backendProcess.close() + backendProcess = null + } +}) + const installExtensions = () => { if (process.env.NODE_ENV === 'development') { const installer = require('electron-devtools-installer') // eslint-disable-line global-require @@ -95,8 +102,6 @@ app.on('ready', () => mainWindow.on('closed', () => { mainWindow = null - backendProcess.close() - backendProcess = null }) if (process.env.NODE_ENV === 'development') {