Add that Menu.setApplication only works after 'ready' event.
I got caught on this while trying to add a menu in my application in OSX.
This commit is contained in:
parent
4fc14959a8
commit
31d606220e
1 changed files with 2 additions and 1 deletions
|
@ -155,7 +155,8 @@ var template = [
|
|||
];
|
||||
|
||||
menu = Menu.buildFromTemplate(template);
|
||||
Menu.setApplicationMenu(menu);
|
||||
|
||||
Menu.setApplicationMenu(menu); // Must be called within app.on('ready', function(){ ... });
|
||||
```
|
||||
|
||||
## Class: Menu
|
||||
|
|
Loading…
Reference in a new issue