Skip to content

Commit

Permalink
chore: address submitterName fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
asharonbaltazar committed Aug 5, 2024
1 parent db2569a commit fe8de8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion react-app/src/api/submissionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ export const buildSubmissionPayload = <T extends Record<string, unknown>>(
) => {
const userDetails = {
submitterEmail: user?.user?.email ?? "N/A",
submitterName: `${user?.user?.given_name} ${user?.user?.family_name}`,
submitterName:
user?.user?.given_name && user?.user?.family_name
? `${user.user.given_name} ${user.user.family_name}`
: "N/A",
};
const baseProperties = {
authority: authority,
Expand Down

0 comments on commit fe8de8b

Please sign in to comment.