From c79bca7644fec446bb24e65ed8986390db2752c9 Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 15 Mar 2019 18:16:11 -0500 Subject: [PATCH] Fix disappearing tray icon --- src/platforms/electron/createTray.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platforms/electron/createTray.js b/src/platforms/electron/createTray.js index 5cc3203ad..40566164c 100644 --- a/src/platforms/electron/createTray.js +++ b/src/platforms/electron/createTray.js @@ -1,6 +1,8 @@ import { app, Menu, Tray } from 'electron'; import path from 'path'; +let tray; + export default window => { let iconPath; @@ -18,7 +20,7 @@ export default window => { } } - const tray = new Tray( + tray = new Tray( process.env.NODE_ENV === 'development' ? iconPath : path.join(process.resourcesPath, iconPath) );