Skip to content

Commit

Permalink
Merge pull request #8317 from learningequality/sidenav-ref-guard
Browse files Browse the repository at this point in the history
Add defensive guard for ref.
  • Loading branch information
marcellamaki authored Aug 18, 2021
2 parents 02a9514 + 58c0b55 commit 416fb7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kolibri/core/assets/src/views/SideNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
if (isShown) {
window.addEventListener('focus', this.containFocus, true);
this.previouslyFocusedElement = document.activeElement;
this.$refs.sideNav.focus();
this.$refs.sideNav && this.$refs.sideNav.focus();
} else {
window.removeEventListener('focus', this.containFocus, true);
this.previouslyFocusedElement.focus();
Expand Down

0 comments on commit 416fb7b

Please sign in to comment.