Skip to content

Commit

Permalink
Issue #PS-000 fix: Added check for custom fields
Browse files Browse the repository at this point in the history
  • Loading branch information
itsvick committed Jan 24, 2025
1 parent 53b3fa9 commit 7ff8ca2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pages/learner/[userId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,12 @@ const LearnerProfile: React.FC<LearnerProfileProp> = ({
}
}
} else {
const fieldValue = getValue(userData, customFieldValue);

if (fieldValue) {
initialFormData[item.name] = fieldValue;
if (customFieldValue) {
const fieldValue = getValue(userData, customFieldValue);
if (fieldValue) {
initialFormData[item.name] = fieldValue;
}
}
}
});
Expand Down

0 comments on commit 7ff8ca2

Please sign in to comment.