на странице обновления созданный хук вызывается дважды по каким-то странным причинам, но этого не произойдет, если я приду с другого маршрута.
created() {
this.$store.dispatch('setInternalComponents',true);
this.getCurrencies();
},
ниже вы можете найти конфигурацию моего маршрутизатора:
Vue.use(VueRouter);
const routes = [
{ path: "/", component: Auth },
{ path: "/resetpassword", component: Resetpwd },
{ path: "/forgotpassword", component: Forgotpwd },
{ path: "/firstlogin", component: FirstLogin},
{
path: "/dashboard",
component: Dashboard,
beforeEnter(to,from,next){
if (store.state.accessToken)
{
next()
}else
next('/')
}
},
{ path: "*", redirect: "/" }
];
export default new VueRouter({
routes: routes,
mode: "history"
});