window null bug fix

This commit is contained in:
Andrew Gundersen 2021-11-23 13:39:40 -06:00
commit d5fd8b39e7

View file

@ -65,7 +65,10 @@ function createWin()
backgroundMitt.removeAllListeners("ipc-renderer");
backgroundMitt.on("ipc-renderer", (channel, ...args) => {
win.webContents.send(channel, ...args);
if (win)
{
win.webContents.send(channel, ...args);
}
});
win.webContents.send("set-account", store.get("account"));