fix(closing): window can be closing on event

This commit is contained in:
Alexey Kasyanchuk 2018-08-03 15:55:21 +03:00
parent 0f450d3133
commit 9d5667eb00

View File

@ -266,7 +266,8 @@ app.on("ready", () => {
{ {
const id = arg[arg.length - 1].callback const id = arg[arg.length - 1].callback
arg[arg.length - 1] = (responce) => { arg[arg.length - 1] = (responce) => {
mainWindow.webContents.send('callback', id, responce) if(mainWindow)
mainWindow.webContents.send('callback', id, responce)
} }
} }
callback.apply(null, arg) callback.apply(null, arg)