mac: Do nothing if calling Menu.setApplicationMenu(null)
This commit is contained in:
parent
3b20f2aced
commit
a22b9be681
1 changed files with 1 additions and 1 deletions
|
@ -134,8 +134,8 @@ Menu.setApplicationMenu = (menu) ->
|
||||||
applicationMenu = menu # Keep a reference.
|
applicationMenu = menu # Keep a reference.
|
||||||
|
|
||||||
if process.platform is 'darwin'
|
if process.platform is 'darwin'
|
||||||
|
return if menu is null
|
||||||
menu._callMenuWillShow()
|
menu._callMenuWillShow()
|
||||||
throw new Error('You can not remove application menu') if menu is null
|
|
||||||
bindings.setApplicationMenu menu
|
bindings.setApplicationMenu menu
|
||||||
else
|
else
|
||||||
windows = BrowserWindow.getAllWindows()
|
windows = BrowserWindow.getAllWindows()
|
||||||
|
|
Loading…
Reference in a new issue