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()
|
// Implements window.close()
|
||||||
ipcMain.on('ELECTRON_BROWSER_WINDOW_CLOSE', function (event) {
|
ipcMain.on('ELECTRON_BROWSER_WINDOW_CLOSE', function (event) {
|
||||||
try {
|
const window = event.sender.getOwnerBrowserWindow()
|
||||||
event.sender.getOwnerBrowserWindow().close()
|
if (window) {
|
||||||
event.returnValue = null
|
window.close()
|
||||||
} catch (error) {
|
|
||||||
event.returnValue = exceptionToMeta(error)
|
|
||||||
}
|
}
|
||||||
|
event.returnValue = null
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue