Fix TypeError: Cannot read property 'isVisible' of undefined
Between v1.32.1 and v1.32.2, createMainWindow() was made an async function, so createTrayIcon() and setupMenu() were called too early. await createMainWindow() before adding the tray icon and menu. Co-authored-by: Matthias Andree <matthias.andree@gmx.de>
This commit is contained in:
parent
9c3196a90c
commit
090541bdb8
1 changed files with 1 additions and 2 deletions
3
main.js
3
main.js
|
@ -914,8 +914,7 @@ app.on('ready', async () => {
|
|||
|
||||
ready = true;
|
||||
|
||||
createWindow();
|
||||
|
||||
await createWindow();
|
||||
if (usingTrayIcon) {
|
||||
tray = createTrayIcon(getMainWindow, locale.messages);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue