From a22b9be681be43891ee468ee45eea79f56d13b5e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 4 Jun 2015 16:14:19 +0800 Subject: [PATCH] mac: Do nothing if calling Menu.setApplicationMenu(null) --- atom/browser/api/lib/menu.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/lib/menu.coffee b/atom/browser/api/lib/menu.coffee index 80e0330943e7..af70af740aaf 100644 --- a/atom/browser/api/lib/menu.coffee +++ b/atom/browser/api/lib/menu.coffee @@ -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()