Implemented unwatchStoreFunction

This commit is contained in:
Joel Collins 2019-11-27 14:47:46 +00:00
parent 951765f2c1
commit 65adab73ee

View file

@ -160,7 +160,8 @@ export default {
return { return {
plugins: {}, plugins: {},
currentTab: "status", 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: { methods: {
updatePlugins: function() { updatePlugins: function() {
console.log("Updating plugin forms"); console.log("Updating plugin forms");