2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-19 16:00:33 +03:00

fix: call afterNavigation after nextTick (#478)

* fix: afterNavigation

* style: use arrow function
This commit is contained in:
Ricardo Gobbo de Souza
2019-10-28 06:24:42 -03:00
committed by Pim
parent c6b20eb1c0
commit fa12530b3e
2 changed files with 10 additions and 4 deletions
+6 -4
View File
@@ -19,10 +19,12 @@ export function addNavGuards (rootVm) {
})
router.afterEach(() => {
const { metaInfo } = resume(rootVm)
rootVm.$nextTick(() => {
const { metaInfo } = resume(rootVm)
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo)
}
if (metaInfo && isFunction(metaInfo.afterNavigation)) {
metaInfo.afterNavigation(metaInfo)
}
})
})
}