From 0ba2fa5cba6c313e8f504512002b2329b4bf6bfb Mon Sep 17 00:00:00 2001 From: Zhuo Lu Date: Sat, 18 Nov 2017 17:56:37 -0800 Subject: [PATCH] Use `else if` --- atom/browser/ui/cocoa/atom_menu_controller.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/atom/browser/ui/cocoa/atom_menu_controller.mm b/atom/browser/ui/cocoa/atom_menu_controller.mm index 45f2f09bce..8a3118880c 100644 --- a/atom/browser/ui/cocoa/atom_menu_controller.mm +++ b/atom/browser/ui/cocoa/atom_menu_controller.mm @@ -166,8 +166,7 @@ Role kRolesMap[] = { [NSApp setWindowsMenu:submenu]; else if (role == base::ASCIIToUTF16("help")) [NSApp setHelpMenu:submenu]; - - if (role == base::ASCIIToUTF16("services")) + else if (role == base::ASCIIToUTF16("services")) [NSApp setServicesMenu:submenu]; } else { // The MenuModel works on indexes so we can't just set the command id as the