Removing try/catch

This commit is contained in:
Hari Juturu 2017-08-17 10:56:37 -07:00
parent 9120774c00
commit 340431750b

View file

@ -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
})