From 27cd6688c112f73295d8f3773acce57586ee6e70 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 19 Feb 2014 13:06:45 +0000 Subject: [PATCH] BrowserWindow::setMenu is available on Linux. --- browser/api/lib/browser-window.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/api/lib/browser-window.coffee b/browser/api/lib/browser-window.coffee index 8503d8a4378d..38946c5500af 100644 --- a/browser/api/lib/browser-window.coffee +++ b/browser/api/lib/browser-window.coffee @@ -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'