fix: validation error in profile update input (#937)

This commit is contained in:
Matti Nannt
2023-10-03 22:03:20 +02:00
committed by GitHub
parent c6678a2607
commit 94e272f47b
3 changed files with 23 additions and 4 deletions
@@ -41,7 +41,11 @@ const Objective: React.FC<ObjectiveProps> = ({ next, skip, formbricksResponseId,
if (selectedObjective) {
try {
setIsProfileUpdating(true);
const updatedProfile = { ...profile, objective: selectedObjective.id };
const updatedProfile = {
...profile,
objective: selectedObjective.id,
name: profile.name ?? undefined,
};
await updateProfileAction(updatedProfile);
setIsProfileUpdating(false);
} catch (e) {