BrowserWindow::setMenu is available on Linux.

This commit is contained in:
Cheng Zhao 2014-02-19 13:06:45 +00:00
parent c340cac02c
commit 27cd6688c1

View file

@ -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'