summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2016-09-09 17:49:48 +0200
committerBryce Johnson <bryce@gitlab.com>2016-10-05 11:25:02 +0200
commit7beb9f3483cf59a9717c2ccc6bd102cd9a97f906 (patch)
treed4decfe0356721dcc1cd46088fdbe3e399f9306d
parent5bc3b7be601a234dfbf16a32b2e58b95d3aa677b (diff)
downloadgitlab-ce-7beb9f3483cf59a9717c2ccc6bd102cd9a97f906.tar.gz
Pass default opts.
-rw-r--r--app/assets/javascripts/profile/profile.js.es62
-rw-r--r--app/assets/javascripts/search_autocomplete.js.es63
2 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/profile/profile.js.es6 b/app/assets/javascripts/profile/profile.js.es6
index 5b1a5920c95..5f674c36de5 100644
--- a/app/assets/javascripts/profile/profile.js.es6
+++ b/app/assets/javascripts/profile/profile.js.es6
@@ -1,7 +1,7 @@
((global) => {
class Profile {
- constructor({ form = $('.edit-user') }) {
+ constructor({ form = $('.edit-user') } = {}) {
this.onSubmitForm = this.onSubmitForm.bind(this);
this.form = form;
this.bindEvents();
diff --git a/app/assets/javascripts/search_autocomplete.js.es6 b/app/assets/javascripts/search_autocomplete.js.es6
index abd0748f6a3..3d710d17ef3 100644
--- a/app/assets/javascripts/search_autocomplete.js.es6
+++ b/app/assets/javascripts/search_autocomplete.js.es6
@@ -15,7 +15,8 @@
autocompletePath = optsEl.data('autocomplete-path'),
projectId = (optsEl.data('autocomplete-project-id') || ''),
projectRef = (optsEl.data('autocomplete-project-ref') || '')
- }) {
+ } = {}) {
+
this.bindEventContext();
this.wrap = wrap;
this.optsEl = optsEl;