Fix error on quit when trying to message closed window

This commit is contained in:
Evan Hahn
2021-02-03 12:39:18 -06:00
committed by GitHub
parent 38193e6591
commit d996c2f950

View File

@@ -386,6 +386,9 @@ async function createWindow() {
mainWindow.on('move', debouncedCaptureStats);
const setWindowFocus = () => {
if (!mainWindow) {
return;
}
mainWindow.webContents.send('set-window-focus', mainWindow.isFocused());
};
mainWindow.on('focus', setWindowFocus);