Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 52df392

Browse files
committed
fix new nullability issue
1 parent 594cf06 commit 52df392

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

client/web/src/enterprise/executors/secrets/SecretAccessLogsModal.tsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,10 @@ const ExecutorSecretAccessLogNode: React.FunctionComponent<React.PropsWithChildr
7777
<div className="d-flex justify-content-between align-items-center flex-wrap mb-0">
7878
<PersonLink
7979
person={{
80-
displayName: node.user.displayName || node.user.username,
81-
email: node.user.email,
82-
user: {
83-
displayName: node.user.displayName,
84-
url: node.user.url,
85-
username: node.user.username,
86-
},
80+
// empty strings are fine here, as they are only used when `user` is not null
81+
displayName: (node.user?.displayName || node.user?.username) ?? '',
82+
email: node.user?.email ?? '',
83+
user: node.user,
8784
}}
8885
/>
8986
<Timestamp date={node.createdAt} />

0 commit comments

Comments
 (0)