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) );