Merge pull request #4598 from BenLubar/fix-avatar-crash

fix avatar upload crash discovered by @AccaliaDeElementia
This commit is contained in:
Barış Soner Uşaklı
2016-05-04 17:57:15 +03:00

View File

@@ -63,7 +63,9 @@ module.exports = function(User) {
async.series([
async.apply(image.normalise, picture.path, extension),
async.apply(fs.rename, picture.path + '.png', picture.path)
], next);
], function(err) {
next(err);
});
},
function(next) {
User.getUserField(updateUid, 'uploadedpicture', next);