Commit a9c3627d authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'jnnkl-new-pipelines-eventlistener' into 'master'

Remove obsolete DomContentLoaded EventListener

See merge request gitlab-org/gitlab!51452
parents 679ce8e5 a833b45a
...@@ -3,17 +3,15 @@ import NewBranchForm from '~/new_branch_form'; ...@@ -3,17 +3,15 @@ import NewBranchForm from '~/new_branch_form';
import setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list'; import setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list';
import initNewPipeline from '~/pipeline_new/index'; import initNewPipeline from '~/pipeline_new/index';
document.addEventListener('DOMContentLoaded', () => { const el = document.getElementById('js-new-pipeline');
const el = document.getElementById('js-new-pipeline');
if (el) { if (el) {
initNewPipeline(); initNewPipeline();
} else { } else {
new NewBranchForm($('.js-new-pipeline-form')); // eslint-disable-line no-new new NewBranchForm($('.js-new-pipeline-form')); // eslint-disable-line no-new
setupNativeFormVariableList({ setupNativeFormVariableList({
container: $('.js-ci-variable-list-section'), container: $('.js-ci-variable-list-section'),
formField: 'variables_attributes', formField: 'variables_attributes',
}); });
} }
});
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