Skip to content

Commit

Permalink
fix: check if articles are available
Browse files Browse the repository at this point in the history
  • Loading branch information
Cezar Sampaio committed May 6, 2020
1 parent e168093 commit 17c263c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/templates/section.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ export default function Section(props) {

{props.data.subCategories.edges.map(({ node }) => (
<div key={node.slug} className="f36-margin-bottom--2xl">
<Subheading className="f36-margin-bottom--xs">{node.name}</Subheading>
<Subheading className="f36-margin-bottom--xs">
{node.name}
</Subheading>

{node.articles.map((article) => (
{node.articles?.map((article) => (
<Paragraph key={article.slug}>
<Link
to={`/${props.data.category.slug}/${node.slug}/${article.slug}/`}
Expand Down

0 comments on commit 17c263c

Please sign in to comment.