diff --git a/Dashboard/app/main/index.js b/Dashboard/app/main/index.js index 8102dd2..bdb5910 100644 --- a/Dashboard/app/main/index.js +++ b/Dashboard/app/main/index.js @@ -72,12 +72,14 @@ if (!gotTheLock) { } }); - //Create tray icon with context menu - trayIcon = createTray(); + mainWindow.webContents.on('did-frame-finish-load', () => { + //Create tray icon with context menu + trayIcon = createTray(); - //Listen to tray icon onclick event - trayIcon.on('click', () => { - mainWindow.show(); + //Listen to tray icon onclick event + trayIcon.on('click', () => { + mainWindow.show(); + }); }); }); }