Skip to content

Missing return after next('/') #7

@kgrab75

Description

@kgrab75

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions