Skip to content

Commit

Permalink
fix: 🤦‍♂️
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed May 27, 2022
1 parent 9a2304f commit 03eb120
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/auth.global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default defineNuxtRouteMiddleware(to => {
if (!$auth.loggedIn.value && to.path !== '/login') {
return navigateTo('/login')
}
if (!$auth.loggedIn.value && to.path === '/login') {
if ($auth.loggedIn.value && to.path === '/login') {
return navigateTo('/')
}
})

0 comments on commit 03eb120

Please sign in to comment.