0👍
✅
How about
let redirectToFirstPhase = true;
router.beforeEach((to, from, next) => {
// let slug = store.state.profile.currentPhase.slug;
if (to.path === '/phase/default' && redirectToFirstPhase) {
redirectToFirstPhase = false;
next('/phase-first');
} else {
next();
}
})
Source:stackexchange.com