Remove global event listeners before destroy

This commit is contained in:
Joel Collins 2019-11-27 16:06:35 +00:00
parent b557b4a715
commit 92b399e644
2 changed files with 8 additions and 0 deletions

View file

@ -261,6 +261,10 @@ export default {
},
beforeDestroy() {
// Remove global signal listener to perform a gallery refresh
this.$root.$off("globalUpdateCaptureList");
// Remove global signal listener to set the gallery folder
this.$root.$off("globalUpdateCaptureFolder");
// Then we call that function here to unwatch
if (this.unwatchStoreFunction) {
this.unwatchStoreFunction();