diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 98c2559..94fa7e5 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -109,14 +109,17 @@ this.fetchUser(); } }, - watch: { - group () { - this.drawer = false - }, - $route() { - this.checkAuth(); - }, - }, + watch: { + group () { + this.drawer = false + }, + $route() { + this.checkAuth(); + if (this.isAuthenticated && !this.user) { + this.fetchUser(); + } + }, + }, methods: { checkAuth() { this.isAuthenticated = AuthService.isAuthenticated();