diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-02-15 16:50:20 -0600 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-02-15 16:50:20 -0600 |
commit | 1c2d283d506f2ceb4777622837fffe381e34cb9d (patch) | |
tree | 2a41129f3f749113c4ba780e484227e23c01d148 /app/assets/javascripts/how_to_merge.js | |
parent | efdde042a3299668957d16200a407b9daae52301 (diff) | |
download | gitlab-ce-1c2d283d506f2ceb4777622837fffe381e34cb9d.tar.gz |
Add dispatcher imports for bundles used in merge request show path
Diffstat (limited to 'app/assets/javascripts/how_to_merge.js')
-rw-r--r-- | app/assets/javascripts/how_to_merge.js | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/app/assets/javascripts/how_to_merge.js b/app/assets/javascripts/how_to_merge.js index 19f4a946f73..12e6f24595a 100644 --- a/app/assets/javascripts/how_to_merge.js +++ b/app/assets/javascripts/how_to_merge.js @@ -1,12 +1,13 @@ -document.addEventListener('DOMContentLoaded', () => { - const modal = $('#modal_merge_info').modal({ - modal: true, - show: false, - }); - $('.how_to_merge_link').on('click', () => { - modal.show(); - }); - $('.modal-header .close').on('click', () => { - modal.hide(); - }); -}); +export default () => { + const modal = $('#modal_merge_info'); + + if (modal) { + modal.modal({ + modal: true, + show: false, + }); + + $('.how_to_merge_link').on('click', modal.show); + $('.modal-header .close').on('click', modal.hide); + } +}; |