-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Description
In ./src/router.js on the branch "lesson5_FINISH"
authentication_course/src/router.js
Lines 38 to 45 in c7337e1
| 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.
Metadata
Metadata
Assignees
Labels
No labels