Skip to content

Commit

Permalink
Merge pull request #709 from ita-social-projects/#708-EditProfileFixI…
Browse files Browse the repository at this point in the history
…mageDeletionBug

#708 [Edit Profile] Fix image deletion bug
  • Loading branch information
Lvyshnevska authored Aug 1, 2024
2 parents ea46a3f + 7b09584 commit 2b50c4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FrontEnd/src/utils/defineChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const defineChanges = (fields, profile, user) => {
} else {
if (!compareValues(defaultValue, currentValue, type)) {
if (type === 'image') {
profileChanges[field] = currentValue.uuid;
profileChanges[field] = currentValue?.uuid;
} else if (['regions', 'activities', 'categories'].includes(field)) {
profileChanges[field] = currentValue.map((obj) => obj.id);
} else if (field === 'phone') {
Expand Down

0 comments on commit 2b50c4c

Please sign in to comment.