2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-25 01:20:34 +03:00

circumvent need to call refresh() after async actions

This commit is contained in:
Declan de Wet
2016-11-10 22:24:38 +02:00
parent c20206d859
commit 1c9f6d08f3
5 changed files with 54 additions and 42 deletions
-4
View File
@@ -18,11 +18,7 @@
name: 'post',
beforeMount () {
const { slug } = this.$route.params
// since fetching a post is asynchronous,
// we need to call `this.$meta().refresh()`
// to update the meta info
this.$store.dispatch('getPost', { slug })
.then(() => this.$meta().refresh())
},
computed: mapGetters([
'isLoading',