mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
fix weird bug by updating routerKey on router "afterEach" hook
This commit is contained in:
parent
fa63687cd6
commit
19d8ebb4a6
1 changed files with 5 additions and 2 deletions
|
@ -28,8 +28,6 @@ const router = new VueRouter({
|
|||
})
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
store.dispatch('UPDATE_ROUTER_KEY', { to, from })
|
||||
store.dispatch('UPDATE_BREADCRUMB', { to, from })
|
||||
if (store.getters.transitions && from.name !== null) {
|
||||
store.dispatch('UPDATE_TRANSITION_NAME', { to, from })
|
||||
}
|
||||
|
@ -45,4 +43,9 @@ router.beforeEach((to, from, next) => {
|
|||
}
|
||||
})
|
||||
|
||||
router.afterEach((to, from) => {
|
||||
store.dispatch('UPDATE_ROUTER_KEY', { to, from })
|
||||
store.dispatch('UPDATE_BREADCRUMB', { to, from })
|
||||
})
|
||||
|
||||
export default router
|
||||
|
|
Loading…
Reference in a new issue