Commit 2a1e5d4d authored by Mike Greiling's avatar Mike Greiling

refactor merge conflicts bundle to reduce side effects

parent 5781f80e
...@@ -12,7 +12,7 @@ import './components/inline_conflict_lines'; ...@@ -12,7 +12,7 @@ import './components/inline_conflict_lines';
import './components/parallel_conflict_lines'; import './components/parallel_conflict_lines';
import syntaxHighlight from '../syntax_highlight'; import syntaxHighlight from '../syntax_highlight';
$(() => { export default function initMergeConflicts() {
const INTERACTIVE_RESOLVE_MODE = 'interactive'; const INTERACTIVE_RESOLVE_MODE = 'interactive';
const conflictsEl = document.querySelector('#conflicts'); const conflictsEl = document.querySelector('#conflicts');
const mergeConflictsStore = gl.mergeConflicts.mergeConflictsStore; const mergeConflictsStore = gl.mergeConflicts.mergeConflictsStore;
...@@ -91,4 +91,4 @@ $(() => { ...@@ -91,4 +91,4 @@ $(() => {
} }
} }
}); });
}); }
import initSidebarBundle from 'ee/sidebar/sidebar_bundle'; import initSidebarBundle from 'ee/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();
});
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