From 65adab73eee18a44104edc3e61522c7e8ee67e6b Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Wed, 27 Nov 2019 14:47:46 +0000 Subject: [PATCH] Implemented unwatchStoreFunction --- src/components/panelLeft.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/panelLeft.vue b/src/components/panelLeft.vue index a3e927ab..0ef7bcf9 100644 --- a/src/components/panelLeft.vue +++ b/src/components/panelLeft.vue @@ -160,7 +160,8 @@ export default { return { plugins: {}, currentTab: "status", - showControlBar: true + showControlBar: true, + unwatchStoreFunction: null }; }, @@ -200,6 +201,14 @@ export default { ); }, + beforeDestroy() { + // Then we call that function here to unwatch + if (this.unwatchStoreFunction) { + this.unwatchStoreFunction(); + this.unwatchStoreFunction = null; + } + }, + methods: { updatePlugins: function() { console.log("Updating plugin forms");