Skip to content
Snippets Groups Projects
Unverified Commit f0fe736e authored by Mike Greiling's avatar Mike Greiling
Browse files

ensure dispatcher is run before other DOMContentLoaded handlers

parent 053c3d0e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,9 +12,9 @@ import ShortcutsIssuable from './shortcuts_issuable';
import Diff from './diff';
import SearchAutocomplete from './search_autocomplete';
 
(function() {
var Dispatcher;
var Dispatcher;
 
(function() {
Dispatcher = (function() {
function Dispatcher() {
this.initSearch();
Loading
Loading
@@ -629,8 +629,8 @@ import SearchAutocomplete from './search_autocomplete';
 
return Dispatcher;
})();
})();
 
$(window).on('load', function() {
new Dispatcher();
});
}).call(window);
export default function initDispatcher() {
return new Dispatcher();
}
Loading
Loading
@@ -33,7 +33,7 @@ import './projects_dropdown';
import './render_gfm';
import initBreadcrumbs from './breadcrumb';
 
import './dispatcher';
import initDispatcher from './dispatcher';
 
// eslint-disable-next-line global-require, import/no-commonjs
if (process.env.NODE_ENV !== 'production') require('./test_utils/');
Loading
Loading
@@ -265,4 +265,6 @@ $(() => {
removeFlashClickListener(flashEl);
});
}
initDispatcher();
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment