Commit 8360c81c authored by Annabel Dunstone's avatar Annabel Dunstone
Browse files

Add null check to formData.append

parent b2f0f8dd9ebc
......@@ -45,4 +45,5 @@
saveForm: ->
self = @
formData = new FormData(@form[0])
......@@ -48,6 +49,6 @@
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')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment