use watchQuery to watch query in URL instead of watch

This commit is contained in:
Moriz Wahl 2020-03-19 20:16:25 +01:00
parent 7d29400ef9
commit fa7f1bb111

View File

@ -130,11 +130,7 @@ export default {
return this.$apollo.loading || (this.posts && this.posts.length > 0)
},
},
watch: {
'$route.query.hashtag'() {
this.hashtag = this.$route.query.hashtag ? this.$route.query.hashtag : null
},
},
watchQuery: ['hashtag'],
methods: {
...mapMutations({
selectOrder: 'posts/SELECT_ORDER',