Skip to content

Commit

Permalink
fix(closing): window can be closing on event
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Aug 3, 2018
1 parent 63158dc commit 84e9573
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ app.on("ready", () => {
{
const id = arg[arg.length - 1].callback
arg[arg.length - 1] = (responce) => {
mainWindow.webContents.send('callback', id, responce)
if(mainWindow)
mainWindow.webContents.send('callback', id, responce)
}
}
callback.apply(null, arg)
Expand Down

0 comments on commit 84e9573

Please sign in to comment.