Skip to content

Commit

Permalink
fix(app): messaging on closing
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Feb 17, 2018
1 parent a1c9adb commit f117b61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,10 @@ app.on("ready", () => {

if (env.name === "production") { autoUpdater.checkForUpdates() }

spider = spiderCall((...data) => mainWindow.webContents.send(...data), (message, callback) => {
spider = spiderCall((...data) => {
if(mainWindow)
mainWindow.webContents.send(...data)
}, (message, callback) => {
ipcMain.on(message, (event, arg) => {
if(Array.isArray(arg) && typeof arg[arg.length - 1] === 'object' && arg[arg.length - 1].callback)
{
Expand Down

0 comments on commit f117b61

Please sign in to comment.