allow the app to quit when not minimized and window is closed

This commit is contained in:
hesalx 2020-06-15 11:32:48 +03:00
parent 62ea631269
commit a0c553b3a9
No known key found for this signature in database
GPG Key ID: 69B7DAA746F8CB43
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ app.on('activate', () => {
}
});
app.on('before-quit', (e) => {
if (app.hookBeforeQuitEvent) {
if (app.hookBeforeQuitEvent && mainWindow) {
e.preventDefault();
emitRemoteEvent('launcher-before-quit');
}