diff --git a/atom/browser/ui/cocoa/atom_menu_controller.mm b/atom/browser/ui/cocoa/atom_menu_controller.mm index fe632fe24b333..668ae0faad57d 100644 --- a/atom/browser/ui/cocoa/atom_menu_controller.mm +++ b/atom/browser/ui/cocoa/atom_menu_controller.mm @@ -220,7 +220,8 @@ - (void)addItemToMenu:(NSMenu*)menu NSMenu* submenu = [[NSMenu alloc] initWithTitle:label]; [item setSubmenu:submenu]; [NSApp setServicesMenu:submenu]; - } else if (type == atom::AtomMenuModel::TYPE_SUBMENU) { + } else if (type == atom::AtomMenuModel::TYPE_SUBMENU && + model->IsVisibleAt(index)) { // Recursively build a submenu from the sub-model at this index. [item setTarget:nil]; [item setAction:nil];