summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-04-18 19:08:42 +0000
committerJacob Schatz <jschatz@gitlab.com>2016-04-18 19:08:42 +0000
commit4c59557f94a3323d4dc1b554a9949b599a9121cb (patch)
tree0606c299db2e1cc436b2f636f565cc3c963abe94 /app
parentbf41703fd219d03b231aa87a71799ec6817eb09e (diff)
parentbeb32f31fba16e84c6bcfb59d538379db2d2a842 (diff)
downloadgitlab-ce-4c59557f94a3323d4dc1b554a9949b599a9121cb.tar.gz
Merge branch '645-profile-update-bug' into 'master'
Add null check to formData.append Fixes https://gitlab.com/gitlab-com/support-forum/issues/645 See merge request !3799
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/profile.js.coffee5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/profile.js.coffee b/app/assets/javascripts/profile.js.coffee
index f4a2562885d..26a12423521 100644
--- a/app/assets/javascripts/profile.js.coffee
+++ b/app/assets/javascripts/profile.js.coffee
@@ -45,9 +45,10 @@ class @Profile
saveForm: ->
self = @
-
formData = new FormData(@form[0])
- formData.append('user[avatar]', @avatarGlCrop.getBlob(), 'avatar.png')
+
+ avatarBlob = @avatarGlCrop.getBlob()
+ formData.append('user[avatar]', avatarBlob, 'avatar.png') if avatarBlob?
$.ajax
url: @form.attr('action')