diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-07 09:04:45 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-06-07 09:04:45 -0500 |
commit | a7936b2f39bd795850dd40ed435e06484e58c4c0 (patch) | |
tree | 8bd92d67cee9c23f31d5f1ff348ff44f0754ba3b /app/assets/javascripts/groups/index.js | |
parent | 9d025c4ed5de8f43acc853853e76e3f2a2925d9b (diff) | |
download | gitlab-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.js | 8 |
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); + } }); }); |