Skip to content

Commit

Permalink
fix: don't construct submenu if it's invisible (#16845)
Browse files Browse the repository at this point in the history
  • Loading branch information
trop[bot] authored and codebytere committed Feb 8, 2019
1 parent 93b4d20 commit b4c27ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion atom/browser/ui/cocoa/atom_menu_controller.mm
Expand Up @@ -242,7 +242,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];
Expand Down

0 comments on commit b4c27ee

Please sign in to comment.