Skip to content

Commit

Permalink
fix issue with overwriting social fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bushblade committed Feb 14, 2020
1 parent f5b66fd commit 4d38b62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/src/components/profile-forms/EditProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const EditProfile = ({
for (const key in profile) {
if (key in profileData) profileData[key] = profile[key];
}
for (const key in profile.social) {
if (key in profileData) profileData[key] = profile.social[key];
}
setFormData(profileData);
}
}, [loading, getCurrentProfile, profile]);
Expand Down

0 comments on commit 4d38b62

Please sign in to comment.