Commit a7936b2f authored by Alfredo Sumaran's avatar Alfredo Sumaran

Turn off every event on beforeDestroy

parent 9d025c4e
/* 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);
}
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment