Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix menubar error on keydown
Browse files Browse the repository at this point in the history
Fix #7055
  • Loading branch information
bbondy committed Feb 5, 2017
1 parent 8a07531 commit adcbb50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/renderer/components/menubar.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ class Menubar extends ImmutableComponent {
case keyCodes.DOWN:
case keyCodes.ENTER:
e.preventDefault()
if (contextMenuIndex === null && template.get(selectedIndex).has('submenu')) {
if (contextMenuIndex === null &&
template.get(selectedIndex) &&
template.get(selectedIndex).has('submenu')) {
e.stopPropagation()
windowActions.setContextMenuSelectedIndex([0])
showContextMenu(this.getMenubarItemBounds(selectedIndex), template.get(selectedIndex).get('submenu').toJS(), this.props.lastFocusedSelector)
Expand Down

3 comments on commit adcbb50

@bbondy
Copy link
Member Author

@bbondy bbondy commented on adcbb50 Feb 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auditors: @bsclifton

@bsclifton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@darkdh
Copy link
Member

@darkdh darkdh commented on adcbb50 Feb 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.