4👍
✅
Add return
after next()
:
beforeEnter: (to, from, next) => {
if (!store.state.roles.includes('is_superadmin')) {
if (!store.state.firm_permissions.includes('can_have_fire_contractors')) {
console.log('success page1')
next({
name: "page0"
})
return // Add this
} else {
next()
}
}
next()
},
Source:stackexchange.com