Skip to content

Commit ec3a185

Browse files
author
Parth Shah
committed
fixing logout function
1 parent 01dcb5c commit ec3a185

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/TopBar/TopBar.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ class TopBar extends Component {
5757
const isLoggedIn = !!userHandle
5858
const logoTargetUrl = isLoggedIn ? '/projects' : '/'
5959

60-
const logoutClick = () => {
61-
window.analytics.reset()
60+
const logoutClick = (evt) => {
61+
evt.preventDefault()
62+
window.analytics && window.analytics.reset()
6263
window.location = logoutLink
63-
6464
}
6565

6666
const userMenuItems = [

0 commit comments

Comments
 (0)