diff options
author | Bryce Johnson <bryce@gitlab.com> | 2016-09-09 18:31:26 +0200 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2016-10-05 11:25:03 +0200 |
commit | b3917d4868120c5a62e4e5525bd3321cb152e2fd (patch) | |
tree | 1a5ec2fd6298a1bcde2487463e1a1a51f6cb36b6 /app/assets/javascripts/blob/blob_ci_yaml.js.es6 | |
parent | 7beb9f3483cf59a9717c2ccc6bd102cd9a97f906 (diff) | |
download | gitlab-ce-b3917d4868120c5a62e4e5525bd3321cb152e2fd.tar.gz |
Set defaults in constructor, in case opts are undefined.
Diffstat (limited to 'app/assets/javascripts/blob/blob_ci_yaml.js.es6')
-rw-r--r-- | app/assets/javascripts/blob/blob_ci_yaml.js.es6 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/blob/blob_ci_yaml.js.es6 b/app/assets/javascripts/blob/blob_ci_yaml.js.es6 index 46496153d7c..bb9d0444a8c 100644 --- a/app/assets/javascripts/blob/blob_ci_yaml.js.es6 +++ b/app/assets/javascripts/blob/blob_ci_yaml.js.es6 @@ -14,9 +14,9 @@ global.BlobCiYamlSelector = BlobCiYamlSelector; class BlobCiYamlSelectors { - constructor({ editor, $dropdowns = $('.js-gitlab-ci-yml-selector') }) { + constructor({ editor, $dropdowns }) { this.editor = editor; - this.$dropdowns = $dropdowns; + this.$dropdowns = $dropdowns || $('.js-gitlab-ci-yml-selector'); this.initSelectors(); } |