Merge pull request #831 from Human-Connection/804-turn-root-listener-off

Turn off $root listeners in beforeDestroy
This commit is contained in:
mattwr18 2019-06-15 08:51:54 -03:00 committed by GitHub
commit 54ca9a6e0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -323,6 +323,7 @@ export default {
})
},
beforeDestroy() {
this.$root.$off('changeLanguage')
this.editor.destroy()
},
methods: {

View File

@ -54,6 +54,9 @@ export default {
this.refetchPostComments()
})
},
beforeDestroy() {
this.$root.$off('refetchPostComments')
},
methods: {
refetchPostComments() {
if (this.$apollo.queries.Post) {