Skip to content

Commit 13439c5

Browse files
add optional chain check
Co-authored-by: Jon Johnson <[email protected]>
1 parent d9e11e4 commit 13439c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/frontend/app/components/user-menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default class UserMenuComponent extends Component {
7474
if (item?.previousElementSibling) {
7575
item.previousElementSibling.querySelector('a').focus();
7676
} else {
77-
item.parentElement.lastElementChild.querySelector('a').focus();
77+
item?.parentElement.lastElementChild.querySelector('a').focus();
7878
}
7979
}
8080
}

0 commit comments

Comments
 (0)