diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index f31e9760..3173a0b3 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -80,8 +80,9 @@ export default { store.dispatch('app/toggleSideBar', false) }, logout: () => { - store.dispatch('user/logout') - router.push(`/login?redirect=${route.fullPath}`) + store.dispatch('user/logout').then(()=>{ + router.push(`/login?redirect=${route.fullPath}`) + }) } }) return {