mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-04-24 03:46:03 +08:00
Fix error when showing empty menu.
This commit is contained in:
@@ -99,7 +99,7 @@ Menu.setApplicationMenu = (menu) ->
|
||||
if process.platform is 'darwin'
|
||||
# Force menuWillShow to be called
|
||||
menuWillShow = (menu) ->
|
||||
menu.delegate.menuWillShow()
|
||||
menu.delegate?.menuWillShow()
|
||||
menuWillShow item.submenu for item in menu.items when item.submenu?
|
||||
menuWillShow menu
|
||||
|
||||
|
||||
@@ -127,10 +127,6 @@ app.on('ready', function() {
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Help',
|
||||
submenu: [],
|
||||
}
|
||||
];
|
||||
|
||||
var menu = Menu.buildFromTemplate(template);
|
||||
|
||||
Reference in New Issue
Block a user