From 7b0958455c900af914d0a295e9a923dc4e526470 Mon Sep 17 00:00:00 2001 From: Lvyshnevska Date: Tue, 30 Jul 2024 14:58:57 +0200 Subject: [PATCH] optional chaining operator added --- FrontEnd/src/utils/defineChanges.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrontEnd/src/utils/defineChanges.js b/FrontEnd/src/utils/defineChanges.js index eff05e5ee..9defa68bd 100644 --- a/FrontEnd/src/utils/defineChanges.js +++ b/FrontEnd/src/utils/defineChanges.js @@ -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') {