Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing return after next('/') #7

Open
kgrab75 opened this issue May 14, 2020 · 0 comments
Open

Missing return after next('/') #7

kgrab75 opened this issue May 14, 2020 · 0 comments

Comments

@kgrab75
Copy link

kgrab75 commented May 14, 2020

In ./src/router.js on the branch "lesson5_FINISH"

router.beforeEach((to, from, next) => {
const loggedIn = localStorage.getItem('user')
if (to.matched.some(record => record.meta.requiresAuth) && !loggedIn) {
next('/')
}
next()
})

After next('/') on line 42, there shoud be a return statement.
If not, the script goes on and hits the next() statement.

kgrab75 pushed a commit to kgrab75/authentication_course that referenced this issue May 14, 2020
@kgrab75 kgrab75 mentioned this issue May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant