Fix 'cannot read property hide of null' error on quit (#1594)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-12-03 14:55:19 +02:00
1 parent 432b00b8cc
commit ac35bab987
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -10,10 +10,10 @@ export function exitApp() {
const clusterManager = ClusterManager.getInstance<ClusterManager>();
appEventBus.emit({ name: "service", action: "close" });
windowManager.hide();
clusterManager.stop();
windowManager?.hide();
clusterManager?.stop();
logger.info("SERVICE:QUIT");
setTimeout(() => {
app.exit();
}, 1000);
}
}
+2 -2
View File
@@ -163,8 +163,8 @@ export class WindowManager extends Singleton {
}
hide() {
if (!this.mainWindow?.isDestroyed()) this.mainWindow.hide();
if (!this.splashWindow.isDestroyed()) this.splashWindow.hide();
if (this.mainWindow && !this.mainWindow.isDestroyed()) this.mainWindow.hide();
if (this.splashWindow && !this.splashWindow.isDestroyed()) this.splashWindow.hide();
}
destroy() {