refactor merge conflicts bundle to reduce side effects

This commit is contained in:
Mike Greiling 2018-02-27 16:53:49 -06:00
parent 94d5dd3b7b
commit c62fe6a293
No known key found for this signature in database
GPG Key ID: 0303DF507FA67596
2 changed files with 7 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import './components/inline_conflict_lines';
import './components/parallel_conflict_lines';
import syntaxHighlight from '../syntax_highlight';
$(() => {
export default function initMergeConflicts() {
const INTERACTIVE_RESOLVE_MODE = 'interactive';
const conflictsEl = document.querySelector('#conflicts');
const mergeConflictsStore = gl.mergeConflicts.mergeConflictsStore;
@ -91,4 +91,4 @@ $(() => {
}
}
});
});
}

View File

@ -1,4 +1,7 @@
import initSidebarBundle from '~/sidebar/sidebar_bundle';
import '~/merge_conflicts/merge_conflicts_bundle';
import initMergeConflicts from '~/merge_conflicts/merge_conflicts_bundle';
document.addEventListener('DOMContentLoaded', initSidebarBundle);
document.addEventListener('DOMContentLoaded', () => {
initSidebarBundle();
initMergeConflicts();
});