Improve appWillClose() reliability

This commit is contained in:
Christopher Willis-Ford 2018-12-20 23:24:57 -08:00
parent 64da5dff27
commit 6486201bf9

View file

@ -72,10 +72,13 @@ const createMainWindow = () => {
// quit application when all windows are closed
app.on('window-all-closed', () => {
telemetry.appWillClose();
app.quit();
});
app.on('will-quit', () => {
telemetry.appWillClose();
});
// global reference to mainWindow (necessary to prevent window from being garbage collected)
let _mainWindow;