fix(closing): window can be closing on event
This commit is contained in:
parent
0f450d3133
commit
9d5667eb00
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user