mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 09:20:32 +01:00
Merge pull request #4598 from BenLubar/fix-avatar-crash
fix avatar upload crash discovered by @AccaliaDeElementia
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user