Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
8360c81c2ce1
Commit
beb32f31
authored
Apr 18, 2016
by
Annabel Dunstone
Browse files
Add null check to formData.append
parent
b2f0f8dd9ebc
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/profile.js.coffee
View file @
8360c81c
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment