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