Skip to content

Commit

Permalink
fix: add guard clause to return null if there are no certificationUrl…
Browse files Browse the repository at this point in the history
…s to display
  • Loading branch information
dleard committed Jun 5, 2020
1 parent eabb5dd commit 6421898
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/containers/Certifier/CertificationRequestsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ export const CertificationRequestsComponent: React.FunctionComponent<Props> = ({
else if (!node.certifiedByFirstName && node.certifiedByLastName)
certifierName = node.certifiedByLastName;

if (!node?.certificationUrlByCertificationUrlId?.id) return null;

return (
<tr key={node?.certificationUrlByCertificationUrlId?.id}>
<tr key={node.certificationUrlByCertificationUrlId.id}>
<td>{facility}</td>
<td>{organisation}</td>
<td>{status}</td>
Expand Down

0 comments on commit 6421898

Please sign in to comment.