From 393f6c9c20fb7eded5008b65242ea44e69bc349c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 5 Aug 2019 08:37:20 -0400 Subject: [PATCH] set 100ms timeout on removing tray to fix crash --- src/electron/tray.main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/electron/tray.main.ts b/src/electron/tray.main.ts index e7418e06d9..7e31b632fd 100644 --- a/src/electron/tray.main.ts +++ b/src/electron/tray.main.ts @@ -80,7 +80,7 @@ export class TrayMain { this.windowMain.win.on('show', async (e: Event) => { const enableTray = await this.storageService.get(ElectronConstants.enableTrayKey); if (!enableTray) { - this.removeTray(false); + setTimeout(() => this.removeTray(false), 100); } }); }