summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/projects/pipelines/new/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pages/projects/pipelines/new/index.js')
-rw-r--r--app/assets/javascripts/pages/projects/pipelines/new/index.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/app/assets/javascripts/pages/projects/pipelines/new/index.js b/app/assets/javascripts/pages/projects/pipelines/new/index.js
index d5563143f0c..08c31f2b3c6 100644
--- a/app/assets/javascripts/pages/projects/pipelines/new/index.js
+++ b/app/assets/javascripts/pages/projects/pipelines/new/index.js
@@ -3,17 +3,15 @@ import NewBranchForm from '~/new_branch_form';
import setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list';
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) {
- initNewPipeline();
- } else {
- new NewBranchForm($('.js-new-pipeline-form')); // eslint-disable-line no-new
+if (el) {
+ initNewPipeline();
+} else {
+ new NewBranchForm($('.js-new-pipeline-form')); // eslint-disable-line no-new
- setupNativeFormVariableList({
- container: $('.js-ci-variable-list-section'),
- formField: 'variables_attributes',
- });
- }
-});
+ setupNativeFormVariableList({
+ container: $('.js-ci-variable-list-section'),
+ formField: 'variables_attributes',
+ });
+}