BrowserWindow::setMenu is available on Linux.
This commit is contained in:
parent
c340cac02c
commit
27cd6688c1
1 changed files with 2 additions and 1 deletions
|
@ -34,7 +34,8 @@ BrowserWindow::restart = ->
|
|||
@loadUrl(@getUrl())
|
||||
|
||||
BrowserWindow::setMenu = (menu) ->
|
||||
throw new Error('BrowserWindow.setMenu is only available on Windows') unless process.platform is 'win32'
|
||||
if process.platform is 'darwin'
|
||||
throw new Error('BrowserWindow.setMenu is not available on OS X')
|
||||
|
||||
throw new TypeError('Invalid menu') unless menu?.constructor?.name is 'Menu'
|
||||
|
||||
|
|
Loading…
Reference in a new issue