diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-07-17 22:03:16 +0300 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-07-17 22:03:16 +0300 |
commit | ab1a8d10452d112fcfa4c1f98375942e06cae831 (patch) | |
tree | 7317b4a33937fbd812bdf7c33bd0ce844c45ef12 /app/assets/javascripts/profile | |
parent | 10bd800297ee9cca53566ae3f021a73e22e2b803 (diff) |
Delete unneeded user avatar formData
Diffstat (limited to 'app/assets/javascripts/profile')
-rw-r--r-- | app/assets/javascripts/profile/profile.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/profile/profile.js b/app/assets/javascripts/profile/profile.js index 8cf7f2f23d0..e49c67ffb5c 100644 --- a/app/assets/javascripts/profile/profile.js +++ b/app/assets/javascripts/profile/profile.js @@ -49,13 +49,15 @@ export default class Profile { saveForm() { const self = this; - const formData = new FormData(this.form[0]); + const formData = new FormData(this.form.get(0)); const avatarBlob = this.avatarGlCrop.getBlob(); if (avatarBlob != null) { formData.append('user[avatar]', avatarBlob, 'avatar.png'); } + formData.delete('user[avatar]-trigger'); + axios({ method: this.form.attr('method'), url: this.form.attr('action'), |