In ./src/router.js on the branch "lesson5_FINISH"
| router.beforeEach((to,from,next)=>{ |
| constloggedIn=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.
In
./src/router.json the branch "lesson5_FINISH"authentication_course/src/router.js
Lines 38 to 45 in c7337e1
After
next('/')on line 42, there shoud be areturnstatement.If not, the script goes on and hits the
next()statement.