Turn off $root listeners in beforeDestroy

This commit is contained in:
Matt Rider 2019-06-14 14:02:22 -03:00
parent dd627535e4
commit 7d00b73530
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) {