From ab1a8d10452d112fcfa4c1f98375942e06cae831 Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Tue, 17 Jul 2018 20:03:16 +0100 Subject: [PATCH] Delete unneeded user avatar formData --- app/assets/javascripts/profile/profile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'),