Fixing uncaught exception on window close
This commit is contained in:
parent
a419fe75ca
commit
9120774c00
1 changed files with 6 additions and 2 deletions
|
@ -465,6 +465,10 @@ ipcMain.on('ELECTRON_BROWSER_WINDOW_CONFIRM', function (event, message, title) {
|
|||
|
||||
// Implements window.close()
|
||||
ipcMain.on('ELECTRON_BROWSER_WINDOW_CLOSE', function (event) {
|
||||
event.sender.getOwnerBrowserWindow().close()
|
||||
event.returnValue = null
|
||||
try {
|
||||
event.sender.getOwnerBrowserWindow().close()
|
||||
event.returnValue = null
|
||||
} catch (error) {
|
||||
event.returnValue = exceptionToMeta(error)
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue