Ver Fonte

If user does not exist, the icon is not displayed

Shun Miyazawa há 3 anos atrás
pai
commit
a77cac0344

+ 3 - 1
packages/app/src/components/Admin/AuditLog/ActivityTable.tsx

@@ -35,7 +35,9 @@ export const ActivityTable : FC<Props> = (props: Props) => {
             return (
             return (
               <tr data-testid="activity-table" key={activity._id}>
               <tr data-testid="activity-table" key={activity._id}>
                 <td>
                 <td>
-                  <UserPicture user={activity.user} className="picture rounded-circle" />
+                  {activity.user != null && (
+                    <UserPicture user={activity.user} className="picture rounded-circle" />
+                  )}
                 </td>
                 </td>
                 <td>{activity.snapshot?.username}</td>
                 <td>{activity.snapshot?.username}</td>
                 <td>{formatDate(activity.createdAt)}</td>
                 <td>{formatDate(activity.createdAt)}</td>