Skip to content

Commit

Permalink
add statement for null values on table
Browse files Browse the repository at this point in the history
  • Loading branch information
zuies committed Jan 22, 2024
1 parent b57a5ed commit 1f98317
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/announcements/TcAnnouncementsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ function TcAnnouncementsTable({
marginRight: '5px',
}}
/>
{truncateCenter(announcement.data[0].template, 20)}
{announcement &&
announcement.data &&
announcement.data[0] &&
announcement.data[0].template
? truncateCenter(announcement.data[0]?.template, 20)
: ''}
</>
}
variant="subtitle2"
Expand Down

0 comments on commit 1f98317

Please sign in to comment.