Skip to content

Commit

Permalink
Close app when main window is closed (Closes #64)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric committed Oct 5, 2018
1 parent d28eb30 commit eb61988
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/browsers/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {BrowserWindow, shell, Menu, MenuItem} = require('electron')
const {app, BrowserWindow, shell, Menu, MenuItem} = require('electron')
const path = require('path')
const url = require('url')

Expand Down Expand Up @@ -44,6 +44,7 @@ module.exports = (dirname) => {
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null
app.quit()
})

mainWindow.webContents.on('new-window', function(e, url) {
Expand Down

0 comments on commit eb61988

Please sign in to comment.