remove sideeffects, init per page

This commit is contained in:
Luke Bennett 2018-04-10 15:57:00 +01:00
parent eae553f816
commit 19f14cfe82
No known key found for this signature in database
GPG Key ID: A738E9C68D3BF31A
3 changed files with 8 additions and 2 deletions

View File

@ -5,7 +5,6 @@ import { mouseenter, debouncedMouseleave, togglePopover } from './shared/popover
export default class Milestone {
constructor() {
Milestone.initDeprecationMessage();
this.bindTabsSwitching();
// Load merge request tab if it is active

View File

@ -6,4 +6,6 @@ document.addEventListener('DOMContentLoaded', () => {
new Milestone(); // eslint-disable-line no-new
new Sidebar(); // eslint-disable-line no-new
new MountMilestoneSidebar(); // eslint-disable-line no-new
Milestone.initDeprecationMessage();
});

View File

@ -1,3 +1,8 @@
import initMilestonesShow from '~/pages/milestones/shared/init_milestones_show';
import Milestone from '~/milestone';
document.addEventListener('DOMContentLoaded', initMilestonesShow);
document.addEventListener('DOMContentLoaded', () => {
initMilestonesShow();
Milestone.initDeprecationMessage();
});