For some reason, resolve is not triggering in this case. I can confirm that localStorage.firstStart is being set and “Not first start.” is being logged to the console.
Any help would be much appreciated!
{
path: '/',
async(routeTo, routeFrom, resolve, reject) {
if( typeof localStorage.uid === 'undefined' || localStorage.uid === null ){
resolve({ url: './pages/login.html' }); // I WORK FINE
} else {
if (localStorage.firstStart){
console.log("Not first start.");
resolve({ url: './pages/home.html' }); // I AM NOT RUNNING
} else {
console.log("First Start.");
resolve({ url: './pages/new-student.html' }); // I WORK FINE
}
}
}
}