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/profile | |
parent | 7beb9f3483cf59a9717c2ccc6bd102cd9a97f906 (diff) | |
download | gitlab-ce-b3917d4868120c5a62e4e5525bd3321cb152e2fd.tar.gz |
Set defaults in constructor, in case opts are undefined.
Diffstat (limited to 'app/assets/javascripts/profile')
-rw-r--r-- | app/assets/javascripts/profile/profile.js.es6 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/profile/profile.js.es6 b/app/assets/javascripts/profile/profile.js.es6 index 5f674c36de5..c16eb93a2dd 100644 --- a/app/assets/javascripts/profile/profile.js.es6 +++ b/app/assets/javascripts/profile/profile.js.es6 @@ -1,9 +1,9 @@ ((global) => { class Profile { - constructor({ form = $('.edit-user') } = {}) { + constructor({ form }) { this.onSubmitForm = this.onSubmitForm.bind(this); - this.form = form; + this.form = form || $('.edit-user'); this.bindEvents(); this.initAvatarGlCrop(); } |