if (whiteList.indexOf(to.matched[0] ? to.matched[0].path : '') !== -1) {
// in the free login whitelist, go directly
next();
} else {
console.log(from, to, next);
// other pages that do not have permission to access are redirected to the login page.
// next(`/login?redirect=${to.path}`);
next({ path: '/error/404' });
NProgress.done();
}
I always receive a message error in chrome console as:
Uncaught (in promise) RangeError: Maximum call stack size exceeded
If not have matched all URLs for router const, I want to redirect to the 404 page. How can I fix it?
How can I always redirect to 404 page if is not Logged and does not have a match of all URLs router const? I'm trying edit file router/index.js as:
And in file permission.js as:
I always receive a message error in chrome console as: Uncaught (in promise) RangeError: Maximum call stack size exceeded
If not have matched all URLs for router const, I want to redirect to the 404 page. How can I fix it?