Skip to content

Commit

Permalink
Prevent blank screen
Browse files Browse the repository at this point in the history
  • Loading branch information
kryswisnaskas committed Apr 2, 2021
1 parent d824f6e commit 1e17732
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/src/pages/Landing/MyAlerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ function renderReports(reports) {
</Tag>
));

const collaboratorsTitle = collaborators.reduce(
const collaboratorsTitle = collaborators ? collaborators.reduce(
(result, collaborator) => `${result + collaborator.fullName}\n`,
'',
);
) : '';

const collaboratorsWithTags = collaborators.map((collaborator) => (
const collaboratorsWithTags = collaborators ? collaborators.map((collaborator) => (
<Tag
key={collaborator.fullName.slice(1, 3) + collaborator.id}
className="smart-hub--table-collection"
>
{collaborator.fullName}
</Tag>
));
)) : '';

const idKey = `my_alerts_${id}`;
const idLink = `/activity-reports/${id}`;
Expand All @@ -73,8 +73,8 @@ function renderReports(reports) {
</td>
<td>{startDate}</td>
<td>
<span className="smart-hub--ellipsis" title={author.fullName}>
{author.fullName}
<span className="smart-hub--ellipsis" title={author ? author.fullName : ''}>
{author ? author.fullName : ''}
</span>
</td>
<td>
Expand Down

0 comments on commit 1e17732

Please sign in to comment.