0👍
You always redirect user here next('login')
and call before each once and once again.
To solve that you need to rewrite your beforeEach
logic:
if (to.name === 'login') {
next()
} else if (!localStorage.passwordEm) {
...
- [Vuejs]-When I click on one category, subcategores for all categories are showing
- [Vuejs]-How to handle Vue JS application when backend API application is not running?
Source:stackexchange.com