mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
parent
432b00b8cc
commit
ac35bab987
@ -10,8 +10,8 @@ export function exitApp() {
|
|||||||
const clusterManager = ClusterManager.getInstance<ClusterManager>();
|
const clusterManager = ClusterManager.getInstance<ClusterManager>();
|
||||||
|
|
||||||
appEventBus.emit({ name: "service", action: "close" });
|
appEventBus.emit({ name: "service", action: "close" });
|
||||||
windowManager.hide();
|
windowManager?.hide();
|
||||||
clusterManager.stop();
|
clusterManager?.stop();
|
||||||
logger.info("SERVICE:QUIT");
|
logger.info("SERVICE:QUIT");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
app.exit();
|
app.exit();
|
||||||
|
|||||||
@ -163,8 +163,8 @@ export class WindowManager extends Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hide() {
|
hide() {
|
||||||
if (!this.mainWindow?.isDestroyed()) this.mainWindow.hide();
|
if (this.mainWindow && !this.mainWindow.isDestroyed()) this.mainWindow.hide();
|
||||||
if (!this.splashWindow.isDestroyed()) this.splashWindow.hide();
|
if (this.splashWindow && !this.splashWindow.isDestroyed()) this.splashWindow.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user