mac: Do nothing if calling Menu.setApplicationMenu(null)

This commit is contained in:
Cheng Zhao 2015-06-04 16:14:19 +08:00
parent 3b20f2aced
commit a22b9be681

View file

@ -134,8 +134,8 @@ Menu.setApplicationMenu = (menu) ->
applicationMenu = menu # Keep a reference.
if process.platform is 'darwin'
return if menu is null
menu._callMenuWillShow()
throw new Error('You can not remove application menu') if menu is null
bindings.setApplicationMenu menu
else
windows = BrowserWindow.getAllWindows()