Skip to content

Commit

Permalink
Fix avatar deletion on edit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmybisenius committed Oct 20, 2020
1 parent 842a61c commit 5e1746a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/functions/Profile/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const mongoose = require('mongoose');
const User = mongoose.model('User');

module.exports = (req, res) => {
req.user.active_profile.image_url = req.body.image_url || null;
if (typeof req.body.image_url != 'undefined') req.user.active_profile.image_url = req.body.image_url || null;
if (req.body.headline) req.user.active_profile.headline = req.body.headline;
if (req.body.subtitle) req.user.active_profile.subtitle = req.body.subtitle;
if (req.body.handle) req.user.active_profile.handle = req.body.handle;
Expand Down

0 comments on commit 5e1746a

Please sign in to comment.