summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/groups/index.js
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2017-06-07 09:04:45 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2017-06-07 09:04:45 -0500
commita7936b2f39bd795850dd40ed435e06484e58c4c0 (patch)
tree8bd92d67cee9c23f31d5f1ff348ff44f0754ba3b /app/assets/javascripts/groups/index.js
parent9d025c4ed5de8f43acc853853e76e3f2a2925d9b (diff)
downloadgitlab-ce-a7936b2f39bd795850dd40ed435e06484e58c4c0.tar.gz
Turn off every event on beforeDestroy
Diffstat (limited to 'app/assets/javascripts/groups/index.js')
-rw-r--r--app/assets/javascripts/groups/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/assets/javascripts/groups/index.js b/app/assets/javascripts/groups/index.js
index 7dcf5680d18..1ab565ccccb 100644
--- a/app/assets/javascripts/groups/index.js
+++ b/app/assets/javascripts/groups/index.js
@@ -1,6 +1,7 @@
/* global Flash */
import Vue from 'vue';
+import GroupsList from '~/groups_list';
import GroupFilterableList from './groups_filterable_list';
import GroupsComponent from './components/groups.vue';
import GroupFolder from './components/group_folder.vue';
@@ -174,5 +175,12 @@ document.addEventListener('DOMContentLoaded', () => {
})
.catch(this.handleErrorResponse);
},
+ beforeDestroy() {
+ eventHub.$off('fetchPage', this.fetchPage);
+ eventHub.$off('toggleSubGroups', this.toggleSubGroups);
+ eventHub.$off('leaveGroup', this.leaveGroup);
+ eventHub.$off('updateGroups', this.updateGroups);
+ eventHub.$off('updatePagination', this.updatePagination);
+ }
});
});