summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/profile
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2016-09-09 18:31:26 +0200
committerBryce Johnson <bryce@gitlab.com>2016-10-05 11:25:03 +0200
commitb3917d4868120c5a62e4e5525bd3321cb152e2fd (patch)
tree1a5ec2fd6298a1bcde2487463e1a1a51f6cb36b6 /app/assets/javascripts/profile
parent7beb9f3483cf59a9717c2ccc6bd102cd9a97f906 (diff)
downloadgitlab-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.es64
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();
}