Skip to content

Commit

Permalink
optional chaining operator added
Browse files Browse the repository at this point in the history
  • Loading branch information
Lvyshnevska committed Jul 30, 2024
1 parent 77f1583 commit 7b09584
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 7b09584

Please sign in to comment.