Merge pull request #1727 from lbryio/fix-mac-undefined

Fix 1698
This commit is contained in:
Sean Yesmunt 2018-07-03 11:43:29 -04:00 committed by GitHub
commit de5a76dd54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,9 @@ app.on('ready', async () => {
}); });
app.on('activate', () => { app.on('activate', () => {
if (rendererWindow) {
rendererWindow.show(); rendererWindow.show();
}
}); });
app.on('will-quit', event => { app.on('will-quit', event => {
@ -120,6 +122,10 @@ app.on('will-quit', event => {
daemon.quit(); daemon.quit();
event.preventDefault(); event.preventDefault();
} }
if (rendererWindow) {
rendererWindow = null;
}
}); });
// https://electronjs.org/docs/api/app#event-will-finish-launching // https://electronjs.org/docs/api/app#event-will-finish-launching