From 7d00b73530e2155c60ee28059d3b4c4251ba81b4 Mon Sep 17 00:00:00 2001 From: Matt Rider Date: Fri, 14 Jun 2019 14:02:22 -0300 Subject: [PATCH] Turn off $root listeners in beforeDestroy --- webapp/components/Editor/index.vue | 1 + webapp/components/comments/CommentList/index.vue | 3 +++ 2 files changed, 4 insertions(+) diff --git a/webapp/components/Editor/index.vue b/webapp/components/Editor/index.vue index 59aa73cb2..0690b15bd 100644 --- a/webapp/components/Editor/index.vue +++ b/webapp/components/Editor/index.vue @@ -323,6 +323,7 @@ export default { }) }, beforeDestroy() { + this.$root.$off('changeLanguage') this.editor.destroy() }, methods: { diff --git a/webapp/components/comments/CommentList/index.vue b/webapp/components/comments/CommentList/index.vue index d127bab47..c70c00c85 100644 --- a/webapp/components/comments/CommentList/index.vue +++ b/webapp/components/comments/CommentList/index.vue @@ -54,6 +54,9 @@ export default { this.refetchPostComments() }) }, + beforeDestroy() { + this.$root.$off('refetchPostComments') + }, methods: { refetchPostComments() { if (this.$apollo.queries.Post) {