Skip to content

Commit

Permalink
fix(menu): Update adapter to check for focus before calling (#2880)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1548230)
  • Loading branch information
williamernest authored and Kenneth G. Franqueiro committed Jun 18, 2018
1 parent e849a11 commit 84fcc08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mdc-menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class MDCMenu extends MDCComponent {
this.previousFocus_ = document.activeElement;
},
restoreFocus: () => {
if (this.previousFocus_) {
if (this.previousFocus_ && this.previousFocus_.focus) {
this.previousFocus_.focus();
}
},
Expand Down

0 comments on commit 84fcc08

Please sign in to comment.